webpack.dev.js
1.24 KB
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
const path = require('path')
const merge = require('webpack-merge');
const common = require('./webpack.common');
var dev = {
output:{
filename: '[name].bundle.js',
path:path.resolve(__dirname,'../','dist'),
// publicPath:'/',
},
devtool:'inline-source-map',
mode:"development",
devServer:{
// contentBase: path.join(__dirname, "../src"),
// publicPath:'/',
// host: "192.168.1.3",
host: "localhost",
port: "3333",
// overlay: true, // 浏览器页面上显示错误
// open: true, // 开启自动打开浏览器
// stats: "errors-only", //stats: "errors-only"表示只打印错误:
hot: true, // 开启热更新
historyApiFallback: true,
disableHostCheck:true,
// host:'0.0.0.0',
proxy: {
'/': {
target: 'http://119.45.28.29:8090',
// target: 'http://146.56.222.200:8090',
// target:'http://47.112.117.15:40001',
changeOrigin: true,
// ws: true,
pathRewrite: {
// "^/api": "/"
}
}
}
},
plugins:[
]
}
module.exports = merge(common, dev);