-
Notifications
You must be signed in to change notification settings - Fork 3
/
webpack.development.js
47 lines (43 loc) · 1.09 KB
/
webpack.development.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
/* eslint-env node */
const { resolve, join } = require('path');
const host = '0.0.0.0';
const port = 7003;
const srcFolder = resolve(__dirname, 'src');
module.exports = {
mode: 'development',
devtool: 'inline-source-map',
entry: ['react-hot-loader/patch', srcFolder ],
output: {
path: resolve('public'),
filename: '[name].js',
chunkFilename: '[name].js',
publicPath: '/',
sourceMapFilename: '[name].js.map',
pathinfo: false,
},
resolve: {
alias: {
'react-dom': '@hot-loader/react-dom',
},
},
devServer: {
contentBase: join(__dirname, 'public'),
publicPath: '/',
disableHostCheck: true,
compress: true,
index: 'client.html',
hot: true,
// http2: true,
https: true,
inline: true,
overlay: true,
port,
host,
historyApiFallback: true,
after: function() {
console.log('Ready on "%s" %o', `https://${host}:${port}`)
},
stats: 'minimal',
noInfo: true,
}
}