forked from sebholstein/angular-hacker-news
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
37 lines (36 loc) · 851 Bytes
/
webpack.config.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
30
31
32
33
34
35
36
37
const path = require('path');
const AotPlugin = require('@ngtools/webpack').AotPlugin;
const UglifyJSPlugin = require('uglifyjs-webpack-plugin');
const webpack = require('webpack');
module.exports = {
entry: path.resolve(__dirname, 'src/main.ts'),
output: {
filename: 'app.min.js',
path: path.resolve(__dirname, 'dist/src/')
},
resolve: {
extensions: ['.ts', '.js']
},
module: {
rules: [
{
test: /\.ts$/,
loaders: ['@ngtools/webpack', 'angular2-template-loader?keepUrl=true'],
},
{
test: /\.(html|css)$/,
loader: 'raw-loader'
},
]
},
plugins: [
new AotPlugin({
tsConfigPath: 'tsconfig.json',
mainPath: './src/main.ts'
}),
new webpack.optimize.ModuleConcatenationPlugin(),
new UglifyJSPlugin({
comments: false
})
]
};