-
Notifications
You must be signed in to change notification settings - Fork 3
/
webpack.config.js
56 lines (55 loc) · 1 KB
/
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
51
52
53
54
55
56
module.exports = [
{
mode: 'production',
output: {
filename: (pathData) => {
if (pathData.chunk.name === 'main') {
return 'test.babel_webpack.js';
}
console.warn('chunks are not supported')
process.exit(1);
}
},
target: [
'web',
'browserslist:IE 8 or Opera 12 or Safari 5.1 or Chrome 15 or Edge 12 or Firefox 4'
],
optimization: {
minimize: false
},
module: {
rules: [
{
test: /\.js$/,
exclude: /(node_modules)/,
use: {
loader: 'babel-loader',
options: {
comments: false,
presets: [
[
'@babel/preset-env',
{
corejs: '3.999999.999999',
bugfixes: true,
targets: {
browsers: [
"IE >= 8",
"Opera >= 12",
"Safari >= 5.1",
"Chrome >= 15",
"Edge >= 12",
"Firefox >= 4"
]
},
useBuiltIns: 'usage'
}
]
]
}
}
}
]
}
}
];