huhang-website/vue.config.js
@zuopngfei 65261663f9 huhang
2025-06-16 18:58:25 +08:00

49 lines
1.7 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
transpileDependencies: true,
lintOnSave: false,
publicPath: process.env.VUE_APP_CDN, // 静态资源路径(默认/,打包后会白屏)
assetsDir: 'static',
productionSourceMap: false,
outputDir: 'dist', // 打包后文件的目录 默认为dist
devServer: {
port: 8088,
proxy: {
// 可以设置多个
'/api':{
target:'https://www.novots.com/',
// target:'http://10.1.2.71',
// target:'http://j24rde.natappfree.cc',
changeOrigin:true,
pathRewrite:{
// '^/api': 'http://10.1.2.71'
'^/api': '/'
// '^/api': 'http://j24rde.natappfree.cc'
}
},
'/api':{
target:'https://www.novots.com/',
// target:'http://10.1.2.71',
// target:'http://j24rde.natappfree.cc',
changeOrigin:true,
pathRewrite:{
// '^/api': 'http://10.1.2.71'
'^/api': '/'
// '^/api': 'http://j24rde.natappfree.cc'
}
},
'/api':{
target:'https://www.novots.com/',
// target:'http://10.1.2.71',
// target:'http://j24rde.natappfree.cc',
changeOrigin:true,
pathRewrite:{
// '^/api': 'http://10.1.2.71'
'^/api': '/'
// '^/api': 'http://j24rde.natappfree.cc'
}
}
}
},
})