File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
packages/@vue/cli-service/lib/config Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -82,10 +82,18 @@ module.exports = (api, options) => {
82
82
// more options:
83
83
// https://github.com/kangax/html-minifier#options-quick-reference
84
84
} ,
85
- // default sort mode uses toposort which cannot handle cyclic deps
85
+ // #1669 default sort mode uses toposort which cannot handle cyclic deps
86
86
// in certain cases, and in webpack 4, chunk order in HTML doesn't
87
87
// matter anyway
88
- chunksSortMode : 'none'
88
+ chunksSortMode : ( a , b ) => {
89
+ if ( a . entry !== b . entry ) {
90
+ // make sure entry is loaded last so user CSS can override
91
+ // vendor CSS
92
+ return b . entry ? - 1 : 1
93
+ } else {
94
+ return 0
95
+ }
96
+ }
89
97
} )
90
98
91
99
// keep chunk ids stable so async chunks have consistent hash (#1916)
You can’t perform that action at this time.
0 commit comments