forked from sonicoder86/angular2-aot-webpack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
50 lines (44 loc) · 950 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
38
39
40
41
42
43
44
45
46
47
48
49
50
'use strict';
let path = require('path');
let webpack = require('webpack');
module.exports = {
entry: {
'bootstrap': './app/bootstrap.ts',
'bootstrap.aot': './app/bootstrap.aot.ts',
},
output: {
path: './dist',
filename: '[name].bundle.js'
},
module: {
rules: [
{
test: /\.ts$/,
use: [
'awesome-typescript?tsconfig=tsconfig.json',
'angular2-template'
]
},
{
test: /\.html$/,
use: 'raw'
}
]
},
plugins: [
new webpack.ProgressPlugin(),
new webpack.ContextReplacementPlugin(
// The (\\|\/) piece accounts for path separators in *nix and Windows
/angular(\\|\/)core(\\|\/)(esm(\\|\/)src|src)(\\|\/)linker/,
path.join(process.cwd(), 'app')
)
],
resolve: {
modules: [
'node_modules',
path.resolve(__dirname, 'app')
],
extensions: ['.ts', '.js']
},
devtool: false
};