pda-cli/vue.config.js
xuan 55f13bb47b feat: 添加下拉远程搜索并完善登录会话
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-04 15:57:46 +08:00

40 lines
1.7 KiB
JavaScript

const path = require('path');
const dotenv = require('dotenv');
// // Load environment variables from .env file
dotenv.config();
module.exports = {
chainWebpack: (config) => {
config.resolve.alias
.set('uview-ui/components/u-select/u-select.vue', path.resolve(__dirname, 'src/components/u-select/u-select.vue'))
.set('uview-ui/components/u-action-sheet/u-action-sheet.vue', path.resolve(__dirname, 'src/components/u-action-sheet/u-action-sheet.vue'))
.set('uview-ui/components/u-dropdown-item/u-dropdown-item.vue', path.resolve(__dirname, 'src/components/u-dropdown-item/u-dropdown-item.vue'));
config.plugin('define').tap((definitions) => {
console.log('VUE_APP_UPGRADE_NAME',JSON.stringify(process.env.VUE_APP_UPGRADE_NAME))
console.log('VUE_APP_PRODUCTION_API_URL',JSON.stringify(process.env.VUE_APP_PRODUCTION_API_URL))
console.log('VUE_APP_DEV_API_URL',JSON.stringify(process.env.VUE_APP_DEV_API_URL))
console.log('VUE_APP_ENV_NAME',JSON.stringify(process.env.VUE_APP_ENV_NAME))
Object.assign(definitions[0], {
'process.env': {
...definitions[0]['process.env'],
VUE_APP_UPGRADE_NAME: JSON.stringify(process.env.VUE_APP_UPGRADE_NAME),
VUE_APP_PRODUCTION_API_URL: JSON.stringify(process.env.VUE_APP_PRODUCTION_API_URL),
VUE_APP_DEV_API_URL: JSON.stringify(process.env.VUE_APP_DEV_API_URL),
VUE_APP_ENV_NAME: JSON.stringify(process.env.VUE_APP_ENV_NAME),
}
})
return definitions
})
},
devServer: {
proxy: {
'/hcscm': {
target: 'http://192.168.1.66:50002',
changeOrigin: true,
secure: false
}
}
}
}