-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwebpack.dev.js
43 lines (40 loc) · 1.08 KB
/
webpack.dev.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
const webpack = require('webpack');
const merge = require('webpack-merge');
// const WebpackBar = require('webpackbar'); // visual indicator in terminal for development
const CommonConfig = require('./webpack.common');
const DevConfig = merge.smartStrategy(
{
devtool: 'replace',
'module.rules.use': 'prepend'
}
)(CommonConfig, {
mode: 'development',
devtool: 'inline-source-map',
devServer: {
hot: false,
historyApiFallback: true,
// host: '0.0.0.0', // Required for Docker -- someone will need to link this somehow
// watchContentBase: true, // no longer valid with webpack-dev-server@4.4.0
compress: true,
port: process.env.PORT || 3000,
// contentBase: 'dist', // no longer valid with webpack-dev-server@4.4.0
},
module: {
rules: [
{
test: /\.(css|scss)$/,
use: [
{
// Creates `style` nodes from JS strings
loader: 'style-loader',
},
]
}
]
},
plugins: [
new webpack.HotModuleReplacementPlugin(),
// new WebpackBar()
]
});
module.exports = DevConfig;