-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.common.config.js
55 lines (50 loc) · 1.01 KB
/
webpack.common.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
51
52
53
54
55
'use strict';
let path = require('path');
module.exports = {
context: path.join(process.cwd(), 'src'),
resolve: {
modules: [
'node_modules',
path.resolve(process.cwd(), 'src')
],
extensions: ['.js', '.json']
},
module: {
rules: [
{
test: /\.js$/,
loader: 'babel-loader',
exclude: /(node_modules)/,
query: {
presets: ['env', 'angular2']
}
},
{
test: /\.js$/,
use: 'source-map-loader',
exclude: [
path.join(process.cwd(), 'node_modules/rxjs'),
path.join(process.cwd(), 'node_modules/@angular')
]
},
{
test: /\.html$/,
use: 'html-loader?attrs=false&caseSensitive&removeAttributeQuotes=false'
}
]
},
stats: {
errorDetails: true,
colors: true,
modules: true,
reasons: true
},
node: {
global: true,
crypto: 'empty',
process: true,
module: false,
clearImmediate: false,
setImmediate: false
}
};