File tree Expand file tree Collapse file tree 1 file changed +15
-11
lines changed Expand file tree Collapse file tree 1 file changed +15
-11
lines changed Original file line number Diff line number Diff line change @@ -8,17 +8,21 @@ import type { RenderToStringOptions } from './types';
88
99const getBundles = ( qrls : QRLInternal [ ] ) => {
1010 const platform = getPlatform ( ) ;
11- return qrls
12- ?. map ( ( qrl ) => {
13- const symbol = qrl . $symbol$ ;
14- const chunk = qrl . $chunk$ ;
15- const result = platform . chunkForSymbol ( symbol , chunk , qrl . dev ?. file ) ;
16- if ( result ) {
17- return result [ 1 ] ;
18- }
19- return chunk ;
20- } )
21- . filter ( Boolean ) as string [ ] ;
11+ return [
12+ ...new Set (
13+ qrls
14+ ?. map ( ( qrl ) => {
15+ const symbol = qrl . $symbol$ ;
16+ const chunk = qrl . $chunk$ ;
17+ const result = platform . chunkForSymbol ( symbol , chunk , qrl . dev ?. file ) ;
18+ if ( result ) {
19+ return result [ 1 ] ;
20+ }
21+ return chunk ;
22+ } )
23+ . filter ( Boolean ) as string [ ]
24+ ) ,
25+ ] ;
2226} ;
2327/** Returns paths to preload relative to the buildBase, with probabilities */
2428export function getPreloadPaths (
You can’t perform that action at this time.
0 commit comments