-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.dev.babel.js
More file actions
41 lines (38 loc) · 915 Bytes
/
webpack.dev.babel.js
File metadata and controls
41 lines (38 loc) · 915 Bytes
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
import webpack from 'webpack';
import paths from './paths';
import rules from './rules';
module.exports = {
mode: 'development',
output: {
filename: '[name].js',
path: paths.outputPath,
chunkFilename: '[name].js'
},
module: {
rules
},
performance: {
hints: 'warning',
maxAssetSize: 450000,
maxEntrypointSize: 8500000,
assetFilter: assetFilename => {
return (
assetFilename.endsWith('.css') || assetFilename.endsWith('.js')
);
}
},
optimization: {
splitChunks: {
chunks: 'all'
}
},
devServer: {
contentBase: paths.outputPath,
compress: true,
hot: true,
historyApiFallback: true
},
plugins: [
new webpack.HotModuleReplacementPlugin()
]
};