-
Notifications
You must be signed in to change notification settings - Fork 0
/
vue.config.js
43 lines (39 loc) · 1.18 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
const CleanWebpackPlugin = require('clean-webpack-plugin');
const pages = {
ripples: {
entry: 'src/index.js'
}
}
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 @knekk/ripples version
config.plugin('define')
.tap(args => {
args[0]['process.env']['VERSION'] = JSON.stringify(require('./package.json').version)
return args
})
},
configureWebpack: {
optimization: {
splitChunks: false
},
plugins: [
new CleanWebpackPlugin({
cleanOnceBeforeBuildPatterns: process.env.NODE_ENV === 'production' ? ['./js/*'] : []
}),
]
},
filenameHashing: false,
pages,
productionSourceMap: false
}