File tree Expand file tree Collapse file tree 1 file changed +9
-14
lines changed
packages/webpack/src/plugins/vue Expand file tree Collapse file tree 1 file changed +9
-14
lines changed Original file line number Diff line number Diff line change @@ -43,24 +43,19 @@ export default class VueSSRClientPlugin {
4343
4444 const allFiles = new Set < string > ( )
4545 const asyncFiles = new Set < string > ( )
46+ const assetsMapping : Record < string , string [ ] > = { }
4647
47- for ( const asset of stats . assets ! ) {
48- const file = asset . name
49- if ( ! isHotUpdate ( file ) ) {
50- allFiles . add ( file )
51- if ( initialFiles . has ( file ) ) { continue }
52- if ( isJS ( file ) || isCSS ( file ) ) {
53- asyncFiles . add ( file )
54- }
48+ for ( const { name : file , chunkNames = [ ] } of stats . assets ! ) {
49+ if ( isHotUpdate ( file ) ) { continue }
50+ allFiles . add ( file )
51+ const isFileJS = isJS ( file )
52+ if ( ! initialFiles . has ( file ) && ( isFileJS || isCSS ( file ) ) ) {
53+ asyncFiles . add ( file )
5554 }
56- }
57-
58- const assetsMapping : Record < string , string [ ] > = { }
59- for ( const { name, chunkNames = [ ] } of stats . assets ! ) {
60- if ( isJS ( name ) && ! isHotUpdate ( name ) ) {
55+ if ( isFileJS ) {
6156 const componentHash = hash ( chunkNames . join ( '|' ) )
6257 const map = assetsMapping [ componentHash ] ||= [ ]
63- map . push ( name )
58+ map . push ( file )
6459 }
6560 }
6661
You can’t perform that action at this time.
0 commit comments