-
Notifications
You must be signed in to change notification settings - Fork 0
/
vue.config.js
48 lines (39 loc) · 1.22 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
45
46
47
48
const path = require('path');
module.exports = {
lintOnSave: true,
configureWebpack: (config) => {
if (process.env.NODE_ENV === 'production') {
//config.mode = 'development';
// mutate config for production...
} else {
//config.mode = 'development';
// mutate for development...
}
},
chainWebpack: (config) => {
//config.cache = false;
// Add our custom loaders
config.resolveLoader.modules
.add(path.resolve(__dirname, 'loaders'))
.end();
// Configure vue-template-loader
// @Important not compatible with <template src="./template.html">
// https://github.com/vuejs/vueify/issues/35
config.module
.rule('html')
.test(/\.html$/)
.exclude.add(/index\.html/)
.add(/\.vue\.html/).end()
.set('loader', 'vue-template-loader')
.set('options', {
scoped: false
})
.end();
// Add custom loader to be able to pre-process *.vue files
config.module
.rule('vue')
.use('vue-auto-tmpl-loader')
.loader('@rouche/vue-auto-tmpl-loader')
.end();
}
}