在vue.config.js下配置
// vue.config.js
module.exports = {
publicPath: './', //配置访问静态文件路径
outputDir: 'dist', //打包存放目录
devServer: {
//port: 9999, //配置本地服务端口
//配置代理服务器
proxy: {
//当检测到路径中存在 /api 进入代理服务器
'/api': {
target: 'http://www.xxapid.com', // 目标服务器的地址
changeOrigin: true, //允许垮域
secure:false,//如果是 https 接口,需要配置这个参数
//将路径中的 /api 替换成空字符串
pathRewrite: {
'^/api': '' // 可以根据需要重写路径
}
}
}
},
configureWebpack: config => {
// 为生产环境修改配置...
if (process.env.NODE_ENV === 'production') {
config.mode = 'production';
// 打包文件大小配置
config.performance = {
maxEntrypointSize: 10000000,
maxAssetSize: 30000000
}
}
},
}
匿名
2025-12-13
大大可以找下哈狗的1030吗,太想要那首歌了~谢谢!
匿名
2025-11-09
https://collaigo.com 免费在线拼图工具
匿名
2025-10-22
盖楼盖楼!
匿名
2025-08-11
沙发沙发
匿名
2025-08-10
https://at.oiik.cn/bing.html
匿名
2025-02-21
实用,我在开发https://minmail.app/时候使用到了