-
Notifications
You must be signed in to change notification settings - Fork 1
/
vue.config.js
54 lines (51 loc) · 1.33 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
49
50
51
52
53
54
const pages = {
mSpinners: {
entry: 'src/index.js'
},
mSpinnerSpin: {
entry: 'src/MSpinnerSpin.vue'
},
mSpinnerPulse: {
entry: 'src/MSpinnerPulse.vue'
},
mSpinnerSwirl: {
entry: 'src/MSpinnerSwirl.vue'
},
mSpinnerSignal: {
entry: 'src/MSpinnerSignal.vue'
}
}
module.exports = {
chainWebpack: config => {
// Prevent html generation of index
config.plugins.delete('html')
config.plugins.delete('preload')
config.plugins.delete('prefetch')
// Prevent html generation of pages
Object.keys(pages).forEach(page => {
config.plugins.delete(`html-${ page }`)
config.plugins.delete(`preload-${ page }`)
config.plugins.delete(`prefetch-${ page }`)
})
// Expose @mountable/spinners version
config.plugin('define')
.tap(args => {
args[0]['process.env']['VERSION'] = JSON.stringify(require('./package.json').version)
return args
})
},
configureWebpack: {
optimization: {
splitChunks: false
}
},
css: {
extract: {
filename: '[name].css',
chunkFilename: '[name].css',
}
},
filenameHashing: false,
pages,
productionSourceMap: false
}