forked from bleenco/ng2-datepicker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.dist.js
29 lines (28 loc) · 1.06 KB
/
webpack.dist.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
const path = require('path');
const root = path.resolve(__dirname);
const webpack = require('webpack');
module.exports = {
resolve: { extensions: ['.ts', '.js', '.json'] },
entry: path.join(root, 'index.ts'),
devtool: 'source-map',
output: {
path: path.join(root, 'bundles'),
publicPath: '/',
filename: 'ng2-datepicker.umd.js',
libraryTarget: 'umd',
library: 'ng2-datepicker',
umdNamedDefine: true
},
module: {
rules: [
{ test: /\.ts$/, use: [
{ loader: 'awesome-typescript-loader', options: { configFilaName: path.join(root, 'tsconfig.json') } },
{ loader: 'angular2-template-loader' }
]},
{ test: /\.json$/, use: 'json-loader' },
{ test: /\.sass$/, use: ['to-string-loader', 'css-loader', 'sass-loader'] },
{ test: /\.html$/, loader: 'html-loader', options: { minimize: true, removeAttributeQuotes: false, caseSensitive: true, customAttrSurround: [ [/#/, /(?:)/], [/\*/, /(?:)/], [/\[?\(?/, /(?:)/] ], customAttrAssign: [ /\)?\]?=/ ] } }
]
},
externals: [/^\@angular\//, /^rxjs\//]
};