After vue-cli3 have to write in the new vue.config.js folder, the general configuration is as follows:
devServer: {
host: '0.0.0.0',
port: 8002,
https: false, // https: {type: boolean}
open: true, // set true to open the default browser, you can also specify
proxy: {
'admin': {
target: 'http://192.168.1.171:10182',
ws: true, // set websocket
changeOrigin: true, // set up cross-domain
pathRewrite: {// prefix Ignored
'^/admin': ''
}
}
}
},
publicPath: './', // vue-cli3.3 + version