vue.config文件的配置
代码展示
vue.config.js文件中写入 代码片
.
module.exports = {
// 基本路径
publicPath: './',
// 输出文件目录
outputDir: 'dist',
assetsDir: 'public',
devServer: {
open: true,
https: false,
// port: 175,
// 设置代理
proxy: {
'/api': {
// target: 'https://api.weixin.qq.com', //代理接口
target: 'http://127.0.0.1:8000',
changeOrigin: true,
pathRewrite: {
'^/api': '', //代理的路径
},
},
},
},
}