-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.dev.js
36 lines (35 loc) · 898 Bytes
/
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
const HtmlWebpackPlugin = require('html-webpack-plugin');
const { merge } = require('webpack-merge');
const common = require('./webpack.common.js');
const path = require('path');
module.exports = merge(common, {
mode: 'development',
entry: {
index: './src/index.js',
},
output: {
filename: 'bundle.min.js',
path: path.resolve(__dirname, 'build'),
},
devtool: 'inline-source-map',
devServer: {
static: path.join(__dirname, 'build'),
compress: false,
host: '0.0.0.0',
port: 8080,
open: true,
watchFiles: {
paths: ['src/**/*'],
options: {
usePolling: false,
},
},
allowedHosts: 'all',
},
plugins: [
new HtmlWebpackPlugin({
template: './src/index.html',
inject: 'body',
}),
],
});