File tree 1 file changed +5
-2
lines changed
packages/vite/src/node/plugins
1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -601,7 +601,10 @@ export function importAnalysisPlugin(config: ResolvedConfig): Plugin {
601
601
// record for HMR import chain analysis
602
602
// make sure to unwrap and normalize away base
603
603
const hmrUrl = unwrapId ( stripBase ( url , base ) )
604
- importedUrls . add ( hmrUrl )
604
+ const isLocalImport = ! isExternalUrl ( hmrUrl ) && ! isDataUrl ( hmrUrl )
605
+ if ( isLocalImport ) {
606
+ importedUrls . add ( hmrUrl )
607
+ }
605
608
606
609
if ( enablePartialAccept && importedBindings ) {
607
610
extractImportedBindings (
@@ -612,7 +615,7 @@ export function importAnalysisPlugin(config: ResolvedConfig): Plugin {
612
615
)
613
616
}
614
617
615
- if ( ! isDynamicImport ) {
618
+ if ( ! isDynamicImport && isLocalImport ) {
616
619
// for pre-transforming
617
620
staticImportedUrls . add ( { url : hmrUrl , id : resolvedId } )
618
621
}
You can’t perform that action at this time.
0 commit comments