File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed
packages/bundler-webpack/src/build/ssr Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -34,14 +34,12 @@ export const createClientPlugin = (
3434 const allFiles = assets . map ( ( a ) => a . name )
3535
3636 // get initial entry files
37- const initialFiles =
38- Object . keys ( entrypoints )
39- . map (
40- ( name ) =>
41- entrypoints [ name ] . assets ?. map ( ( item ) => item . name ) ?? [ ] ,
42- )
43- . reduce ( ( assets , all ) => all . concat ( assets ) , [ ] )
44- . filter ( ( file ) => isJS ( file ) || isCSS ( file ) ) ?? [ ]
37+ const initialFiles = Object . keys ( entrypoints )
38+ . flatMap (
39+ ( name ) =>
40+ entrypoints [ name ] . assets ?. map ( ( item ) => item . name ) ?? [ ] ,
41+ )
42+ . filter ( ( file ) => isJS ( file ) || isCSS ( file ) )
4543
4644 // get files that should be loaded asynchronously
4745 // i.e. script and style files that are not included in the initial entry files
You can’t perform that action at this time.
0 commit comments