31 lines
512 B
JavaScript
31 lines
512 B
JavaScript
const { defineConfig } = require("@vue/cli-service");
|
|
|
|
const appURL = process.env.VUE_APP_URL;
|
|
|
|
console.log("当前 VUE_APP_URL", appURL);
|
|
|
|
module.exports = defineConfig({
|
|
transpileDependencies: true,
|
|
lintOnSave: false,
|
|
devServer: {
|
|
port: 9527,
|
|
proxy: {
|
|
"/api": {
|
|
target: appURL,
|
|
changeOrigin: true,
|
|
},
|
|
},
|
|
},
|
|
});
|
|
|
|
/**
|
|
* 开发环境
|
|
* npm run serve
|
|
*
|
|
* 测试环境
|
|
* npm run serve -- --mode test
|
|
*
|
|
* 生产环境
|
|
* npm run serve -- --mode production
|
|
**/
|