-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathwebpack.dev.js
More file actions
25 lines (23 loc) · 885 Bytes
/
Copy pathwebpack.dev.js
File metadata and controls
25 lines (23 loc) · 885 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
const { merge } = require('webpack-merge')
const common = require('./webpack.config.js')
const path = require('path');
module.exports = merge(common, {
mode: 'development',
devtool: 'eval-source-map',
watchOptions: {
//Files or folders that are not monitored
ignored: /node_modules/,
//After listening to the change, it will wait for 300ms to execute the action, so as to prevent the file from being updated too fast, resulting in too high recompilation frequency
aggregateTimeout: 300,
//To judge whether the file has changed or not is realized by constantly asking the system whether the specified file has changed or not
poll: 1000
},
devServer: {
static: {
directory: path.join(__dirname, 'dist'),
directory: path.join(__dirname, 'data'),
},
compress: true,
port: 8080,
},
})