-
Notifications
You must be signed in to change notification settings - Fork 0
/
vue.config.js
42 lines (41 loc) · 1.27 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
const path = require('path')
module.exports = {
productionSourceMap: false,
lintOnSave: process.env.NODE_ENV !== 'production',
runtimeCompiler: true,
outputDir: 'vue/dist',
css: {
extract: false
},
chainWebpack: config => {
// delete default entry point 'app'
config.entryPoints.delete("app").end();
//delete default 'html' plugin - in case you don't want default index.html file
//delete 'prefetch' and 'preload' plugins which are dependent on 'html' plugin
config.plugins
.delete("html")
.delete("prefetch")
.delete("preload");
},
configureWebpack: {
entry: {
blocks: "./vue/src/blocks/main.js",
display: "./vue/src/display/main.js",
fields: "./vue/src/fields/main.js",
vue: "./vue/src/vue.js",
},
output: {
filename: () => (process.env.VUE_CLI_MODERN_MODE && !process.env.VUE_CLI_MODERN_BUILD) ? 'js/[name]-modern.js' : 'js/[name].js'
},
optimization: {
concatenateModules: false,
providedExports: false,
usedExports: false
},
resolve: {
alias: {
vue: path.resolve('./node_modules/vue')
}
}
}
}