-
Notifications
You must be signed in to change notification settings - Fork 14
/
webpack.dev.cjs
50 lines (49 loc) · 1.17 KB
/
webpack.dev.cjs
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
45
46
47
48
49
50
const path = require('path');
const { merge } = require('webpack-merge');
const commonConfig = require('./webpack.common.cjs');
module.exports = merge(commonConfig, {
mode: 'development',
devServer: {
static: [
path.join(__dirname, 'example')
],
compress: true,
port: 9000,
proxy: [{
context: ['/print-v2/**'],
target: 'http://localhost:18082',
changeOrigin: true,
pathRewrite: {
'^/print-v2': '/print'
}
}, {
context: ['/print-v3/**'],
target: 'http://localhost:18083',
changeOrigin: true,
pathRewrite: {
'^/print-v3': '/print'
}
}, {
context: ['/print/pdf/**'],
target: 'http://localhost:18082',
changeOrigin: true,
pathRewrite: {
'^/print/pdf': '/print/pdf'
}
}, {
context: ['/print/status/**'],
target: 'http://localhost:18083',
changeOrigin: true,
pathRewrite: {
'^/print/status': '/print/status'
}
}, {
context: ['/print/report/**'],
target: 'http://localhost:18083',
changeOrigin: true,
pathRewrite: {
'^/print/report': '/print/report'
}
}]
}
});