-
Notifications
You must be signed in to change notification settings - Fork 0
/
vue.config.js
49 lines (39 loc) · 986 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
42
43
44
45
46
47
48
49
// User Variables
const widgetStyle = false
const publicPath = "/"
// Packages & Plugins
const path = require('path')
module.exports = {
// Base URL
publicPath: process.env.NODE_ENV === 'production' ?
publicPath : '/',
pages: {
index: {
entry: './src/main.js',
template: './public/index.html'
},
},
// Remove Vendor
chainWebpack: config => {
if (widgetStyle) {
config.optimization.delete('splitChunks');
}
const types = ['vue-modules', 'vue', 'normal-modules', 'normal']
types.forEach(type => addStyleResource(config.module.rule('stylus').oneOf(type)))
function addStyleResource (rule) {
rule.use('style-resource')
.loader('style-resources-loader')
.options({
patterns: [
path.resolve(__dirname, './src/styles/styles.styl'),
],
})
}
},
configureWebpack: {
plugins: [
]
},
// Remove Hashing
filenameHashing: !widgetStyle,
}