78 lines
1.6 KiB
JavaScript
78 lines
1.6 KiB
JavaScript
const {defineConfig} = require('@vue/cli-service')
|
||
const path = require('path');
|
||
const webpack = require('webpack')
|
||
module.exports = defineConfig({
|
||
|
||
transpileDependencies: ['vuetify'],
|
||
lintOnSave:false,//关闭语法检查
|
||
productionSourceMap: false,//打包不生成map文件,减少文件大小
|
||
devServer: {
|
||
// hot: true, // 热更新
|
||
// port: '8060',
|
||
port: process.env.NODE_ENV === 'production'
|
||
? '8060'
|
||
: '10086',
|
||
|
||
proxy: {
|
||
// "/api": {
|
||
// // target: 'https://www.aida.com.hk', //后端接口地址
|
||
// target: process.env.VUE_APP_BASE_URL,
|
||
// changeOrigin: true, //是否允许跨越
|
||
// }
|
||
'/api':{
|
||
target:'http://192.168.1.7:5567',
|
||
changeOrigin:true,
|
||
},
|
||
'/robot':{
|
||
target:'http://18.167.251.121:9991',
|
||
changeOrigin:true,
|
||
pathRewrite:{
|
||
'^/robot': 'api', // api替换成api
|
||
}
|
||
},
|
||
'/xuPei':{
|
||
target:'http://192.168.1.10:5567',
|
||
changeOrigin:true,
|
||
pathRewrite:{
|
||
'^/xuPei': 'api', // api替换成api
|
||
}
|
||
}
|
||
},
|
||
https:true,
|
||
},
|
||
pluginOptions: {
|
||
"style-resources-loader": {
|
||
preProcessor: "less",
|
||
patterns: [
|
||
// 存放less变量文件的路径
|
||
path.resolve(__dirname, "./src/assets/style/style.less")
|
||
|
||
]
|
||
|
||
}
|
||
|
||
},
|
||
|
||
css: {
|
||
loaderOptions: {
|
||
less: {
|
||
lessOptions: {
|
||
modifyVars: {
|
||
'primary-color': '#ec6800'
|
||
},
|
||
javascriptEnabled: true,
|
||
},
|
||
|
||
},
|
||
|
||
},
|
||
|
||
},
|
||
configureWebpack: {
|
||
plugins: [
|
||
require('unplugin-element-plus/webpack')({
|
||
// options
|
||
}),
|
||
],
|
||
},
|
||
}) |