File tree Expand file tree Collapse file tree 2 files changed +6
-11
lines changed Expand file tree Collapse file tree 2 files changed +6
-11
lines changed Original file line number Diff line number Diff line change @@ -7,14 +7,6 @@ module.exports = {
7
7
// when you use electron please set to relative path like ./
8
8
// otherwise only set to absolute path when you're using history mode
9
9
publicPath : '{{#if electron}}.{{/if}}/' ,
10
- // add these dependencies to a standalone vendor bundle
11
- vendor : [
12
- 'vue' ,
13
- 'vuex' ,
14
- 'vue-router' ,
15
- 'vuex-router-sync' ,
16
- 'promise-polyfill'
17
- ] ,
18
10
// disable babelrc by default
19
11
babel : {
20
12
babelrc : false ,
Original file line number Diff line number Diff line change @@ -21,8 +21,6 @@ if (config.electron) {
21
21
base . devtool = 'source-map'
22
22
}
23
23
24
- // a white list to add dependencies to vendor chunk
25
- base . entry . vendor = config . vendor
26
24
// use hash filename to support long-term caching
27
25
base . output . filename = '[name].[chunkhash:8].js'
28
26
// add webpack plugins
@@ -44,7 +42,12 @@ base.plugins.push(
44
42
// extract vendor chunks
45
43
new webpack . optimize . CommonsChunkPlugin ( {
46
44
name : 'vendor' ,
47
- filename : 'vendor.[chunkhash:8].js'
45
+ minChunks : module => {
46
+ return module . resource && / \. ( j s | c s s | e s 6 ) $ / . test ( module . resource ) && module . resource . indexOf ( 'node_modules' ) !== - 1
47
+ }
48
+ } ) ,
49
+ new webpack . optimize . CommonsChunkPlugin ( {
50
+ name : 'manifest'
48
51
} ) ,
49
52
// progressive web app
50
53
// it uses the publicPath in webpack config
You can’t perform that action at this time.
0 commit comments