// vue.config.js
module.exports = {
// 选项...
publicPath: '/js/weixin/',
// publicPath:'',
devServer: {
proxy: {
'/weixin': {
ws: false,
target: 'http://127.0.0.1',
changeOrigin: true,//解决跨域问题
},
'/files': {
ws: false,
target: 'http://127.0.0.1',
changeOrigin: true,//解决跨域问题
},
}
}
}
publicPath配置空则默认当前目录
publicPath配置‘/’ 则是绝对目录