-
Notifications
You must be signed in to change notification settings - Fork 0
/
vue.config.js
44 lines (41 loc) · 1.41 KB
/
vue.config.js
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
const { resolve, join } = require('path');
const { mergeSassVariables } = require('@vuetify/cli-plugin-utils');
/** @param args {string[]} */
const path = (...args) => resolve(join(__dirname, ...args));
module.exports = {
publicPath: '/',
lintOnSave: false,
transpileDependencies: ['vuetify'],
configureWebpack: {
resolve: {
alias: {
'@themeConfig': path('themeConfig.js'),
'@core': path('src/@core'),
'@axios': path('src/plugins/axios.js'),
'@user-variables': path('src/styles/variables.scss'),
apexcharts: path('node_modules/apexcharts-clevision'),
},
},
},
chainWebpack: (config) => {
const modules = ['vue-modules', 'vue', 'normal-modules', 'normal'];
modules.forEach((match) => {
config.module
.rule('sass')
.oneOf(match)
.use('sass-loader')
.tap((opt) => mergeSassVariables(opt, "'@/styles/variables.scss'"));
config.module
.rule('scss')
.oneOf(match)
.use('sass-loader')
.tap((opt) => mergeSassVariables(opt, "'@/styles/variables.scss';"));
});
config.module
.rule('ts')
.test(/\.ts$/)
.use('ts-loader')
.loader('ts-loader')
.end();
},
};