File tree 1 file changed +11
-10
lines changed
packages/vite/src/node/optimizer
1 file changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -561,16 +561,6 @@ function esbuildScanPlugin(
561
561
external : doExternalize ( path ) ,
562
562
}
563
563
} )
564
- // onResolve is not called for glob imports.
565
- // we need to add that here as well until esbuild calls onResolve for glob imports.
566
- // https://github.com/evanw/esbuild/issues/3317
567
- build . onLoad ( { filter, namespace : 'file' } , ( ) => {
568
- const externalOnLoadResult : OnLoadResult = {
569
- loader : 'js' ,
570
- contents : 'export default {}' ,
571
- }
572
- return externalOnLoadResult
573
- } )
574
564
}
575
565
576
566
// css
@@ -647,6 +637,17 @@ function esbuildScanPlugin(
647
637
contents,
648
638
}
649
639
} )
640
+
641
+ // onResolve is not called for glob imports.
642
+ // we need to add that here as well until esbuild calls onResolve for glob imports.
643
+ // https://github.com/evanw/esbuild/issues/3317
644
+ build . onLoad ( { filter : / .* / , namespace : 'file' } , ( ) => {
645
+ const externalOnLoadResult : OnLoadResult = {
646
+ loader : 'js' ,
647
+ contents : 'export default {}' ,
648
+ }
649
+ return externalOnLoadResult
650
+ } )
650
651
} ,
651
652
}
652
653
}
You can’t perform that action at this time.
0 commit comments