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
| let defaultPage = '/index.html' // 默认启动页面
| // 定义端口
| const port = process.env.port || process.env.npm_config_port || 8080 // dev port
| module.exports = {
| lintOnSave: false,
| productionSourceMap: false,
| publicPath: './',
| // webpack-dev-server 相关配置
| devServer: {
| // host: '192.168.90.30',
| index: defaultPage, // 默认启动页面
| port: port,
| open: true,
| overlay: { // 错误、警告在页面弹出
| warnings: false,
| errors: true
| },
| // 代理相关配置 比如 上传文件地址 地图地址等
| proxy: {
| // '/test': {
| // target: 'http://8.140.179.55:8080',
| // changeOrigin: true,
| // secure: false,
| // pathRewrite: {
| // '^/test': '' // 路径重写
| // }
| // },
| '/': {
| target: 'http://8.140.179.55:9080/',
| changeOrigin: true,
| secure: false
| }
| }
| }
| }
|
|