Files
aida_front/vue.config.js

79 lines
1.7 KiB
JavaScript
Raw Normal View History

2023-01-06 16:00:15 +08:00
const {defineConfig} = require('@vue/cli-service')
const path = require('path');
2023-07-26 15:54:34 +08:00
const webpack = require('webpack')
2023-01-06 16:00:15 +08:00
module.exports = defineConfig({
transpileDependencies: ['vuetify'],
lintOnSave:false,//关闭语法检查
2023-09-12 10:11:27 +08:00
productionSourceMap: false,//打包不生成map文件减少文件大小
2023-01-06 16:00:15 +08:00
devServer: {
// hot: true, // 热更新
2023-07-26 15:54:34 +08:00
// port: '8060',
port: process.env.NODE_ENV === 'production'
? '8060'
: '10086',
2023-01-06 16:00:15 +08:00
proxy: {
2023-08-05 12:52:56 +08:00
// "/api": {
// // target: 'https://www.aida.com.hk', //后端接口地址
// target: process.env.VUE_APP_BASE_URL,
// changeOrigin: true, //是否允许跨越
// }
2023-08-21 10:55:39 +08:00
'/api':{
2024-08-19 10:36:46 +08:00
target:'http://192.168.1.7:5567',
2024-07-08 09:42:21 +08:00
// target:'https://develop.api.aida.com.hk',
2023-08-05 12:52:56 +08:00
changeOrigin:true,
2023-09-25 10:09:00 +08:00
},
2024-07-08 09:42:21 +08:00
'/xupei':{
target:'http://192.168.1.7:5567',
2023-09-25 10:09:00 +08:00
changeOrigin:true,
pathRewrite:{
'^/robot': 'api', // api替换成api
}
},
2024-01-26 14:43:20 +08:00
'/oldsis':{
2024-01-26 15:12:10 +08:00
target:'https://old.api.aida.com.hk',
2023-09-25 10:09:00 +08:00
changeOrigin:true,
pathRewrite:{
2024-01-26 14:43:20 +08:00
'^/oldsis': 'api', // api替换成api
2023-09-25 10:09:00 +08:00
}
2023-08-05 12:52:56 +08:00
}
2023-01-06 16:00:15 +08:00
},
2024-01-24 10:34:05 +08:00
// https:true,
2023-01-06 16:00:15 +08:00
},
pluginOptions: {
"style-resources-loader": {
preProcessor: "less",
patterns: [
// 存放less变量文件的路径
path.resolve(__dirname, "./src/assets/style/style.less")
]
}
},
css: {
loaderOptions: {
less: {
2024-12-11 16:26:36 +08:00
additionalData: `@import (reference) "~@/assets/style/style.less";`,
2023-01-06 16:00:15 +08:00
lessOptions: {
modifyVars: {
'primary-color': '#ec6800'
},
javascriptEnabled: true,
},
},
},
2023-11-16 17:23:17 +08:00
},
configureWebpack: {
plugins: [
require('unplugin-element-plus/webpack')({
// options
}),
],
},
2023-01-06 16:00:15 +08:00
})