-
Notifications
You must be signed in to change notification settings - Fork 3
/
vue.config.js
41 lines (38 loc) · 951 Bytes
/
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
const path = require('path')
function resolve(dir) {
return path.join(__dirname, dir)
}
module.exports = {
publicPath: './',
transpileDependencies: ['vuetify'],
chainWebpack: (config) => {
// 特殊处理read.scss
{
config.module
.rule('scss')
.oneOf('read.scss')
.before('normal')
.test(/read\.scss$/)
config.module
.rule('scss')
.oneOf('read.scss')
.use('file-loader')
.loader('file-loader')
.options({ name: 'css/[contenthash].css' })
const cssConfig = config.module.rule('scss').oneOf('normal').uses
config.module
.rule('scss')
.oneOf('read.scss')
.uses.set('postcss-loader', cssConfig.get('postcss-loader'))
.set('sass-loader', cssConfig.get('sass-loader'))
}
},
configureWebpack: {
resolve: {
alias: {
'@': resolve('src')
}
}
},
productionSourceMap: false
}