inleft
2022-03-03 5dfef883049e7f0670f6c6b1b225b233aee41eea
commit | author | age
bf6fbe 1 // vue.config.js for less-loader@6.0.0
L 2 module.exports = {
56a4b8 3     configureWebpack: (config) => {
I 4         config.module.rules.push({
aab811 5             test: /\.(md|htm)$/,
56a4b8 6             use: [{
I 7                 loader: 'text-loader', // 解决ivew组件 忽略前缀i的问题
8                 options: {
9                     prefix: false
10                 }
d629d9 11             }, ]
56a4b8 12         })
I 13     },
bf6fbe 14     css: {
L 15         loaderOptions: {
16             less: {
17                 lessOptions: {
18                     // If you are using less-loader@5 please spread the lessOptions to options directly
19                     modifyVars: {
20                         "primary-color": "#1DA57A", // 全局主色
d629d9 21                         // "link-color": "#1890ff", // 链接色
L 22                         "link-color": "#ffffff", // 链接色
23                         "link-hover-color": "#30a9de",
bf6fbe 24                         "success-color": "#52c41a", // 成功色
L 25                         "warning-color": "#faad14", // 警告色
26                         "error-color": "#f5222d", // 错误色
27                         "font-size-base": "14px", // 主字号
28                         "heading-color": "rgba(0, 0, 0, 0.85) ", // 标题色
29                         "text-color": "rgba(0, 0, 0, 0.65) ", // 主文本色
30                         "text-color-secondary": "rgba(0, 0, 0, 0.45) ", // 次文本色
31                         "disabled-color": "rgba(0, 0, 0, 0.25)", // 失效色
32                         "border-radius-base": "4px", // 组件 / 浮层圆角 "border-color-base": "#d9d9d9" ,// 边框色
33                         "box-shadow-base": "0 2px 8px rgba(0, 0, 0, 0.15) " // 浮层阴影
34                     },
35                     javascriptEnabled: true,
36                 },
37             },
38         },
39     },
279785 40     devServer: {
I 41         port: 8080,
42         proxy: {
43             '/api': {
44                 target: process.env.VUE_APP_API_BASE_URL,
45                 ws: false,
46                 changeOrigin: true,
47                 pathRewrite: {
48                     '^/api': '' // 需要rewrite的,
49                 }
50             }
51         }
52     },
bf6fbe 53 };