-
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathwebpack.dev.js
More file actions
34 lines (33 loc) · 835 Bytes
/
webpack.dev.js
File metadata and controls
34 lines (33 loc) · 835 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
const path = require('path')
const webpack = require('webpack')
const merge = require('webpack-merge')
const html = require('html-webpack-plugin')
const common = require('./webpack.config.js')
module.exports = merge(common, {
mode: 'development',
devtool: false,
plugins: [
new webpack.SourceMapDevToolPlugin({}),
new html({
template: path.join(__dirname, 'src', 'views', 'index.html'),
}),
],
devServer: {
contentBase: path.join(__dirname, 'dist'),
port: 8000,
historyApiFallback: true,
headers: {
'Access-Control-Allow-Origin': '*',
},
proxy: {
'/db': 'http://localhost:5070',
'/api': 'http://localhost:5070',
'/proxy': 'http://localhost:5070',
},
},
watchOptions: {
poll: true,
aggregateTimeout: 1000,
ignored: /node_modules/,
},
})