-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathvue.config.js
More file actions
46 lines (43 loc) · 1.09 KB
/
vue.config.js
File metadata and controls
46 lines (43 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
const path = require("path");
const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
transpileDependencies: true,
// 本地服务配置
devServer: {
// disableHostCheck: true
// host: 'xxx.xxx.xxx.xx', // 本机地址
// port: 8080, // 端口号
// https: false, // https:{type:Boolean}
// open: true, //配置自动启动浏览器
// proxy: {
// '/api': {
// target: 'http://www.xxx.com/api', // 跨域地址
// changeOrigin: true,
// pathRewrite: {
// '^/api': ''
// }
// }
// }
},
// 全局配置less
css: {
loaderOptions: {
less: {
lessOptions: {
// DO NOT REMOVE THIS LINE
javascriptEnabled: true,
globalVars: {
// less vars,customize ant design theme
// 'primary-color': '#F5222D',
}
}
}
}
},
pluginOptions: {
'style-resources-loader': {
preProcessor: 'less',
patterns: [path.resolve(__dirname, './src/assets/less/main.less')]
}
}
})