Commit 7c06ef0 1 parent ff57d61 commit 7c06ef0 Copy full SHA for 7c06ef0
File tree 1 file changed +9
-10
lines changed
packages/vite/src/node/optimizer
1 file changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -790,17 +790,16 @@ function findInteropMismatches(
790
790
const needsInteropMismatch = [ ]
791
791
for ( const dep in discovered ) {
792
792
const discoveredDepInfo = discovered [ dep ]
793
+ if ( discoveredDepInfo . needsInterop === undefined ) continue
794
+
793
795
const depInfo = optimized [ dep ]
794
- if ( depInfo ) {
795
- if (
796
- discoveredDepInfo . needsInterop !== undefined &&
797
- depInfo . needsInterop !== discoveredDepInfo . needsInterop
798
- ) {
799
- // This only happens when a discovered dependency has mixed ESM and CJS syntax
800
- // and it hasn't been manually added to optimizeDeps.needsInterop
801
- needsInteropMismatch . push ( dep )
802
- debug ?.( colors . cyan ( `✨ needsInterop mismatch detected for ${ dep } ` ) )
803
- }
796
+ if ( ! depInfo ) continue
797
+
798
+ if ( depInfo . needsInterop !== discoveredDepInfo . needsInterop ) {
799
+ // This only happens when a discovered dependency has mixed ESM and CJS syntax
800
+ // and it hasn't been manually added to optimizeDeps.needsInterop
801
+ needsInteropMismatch . push ( dep )
802
+ debug ?.( colors . cyan ( `✨ needsInterop mismatch detected for ${ dep } ` ) )
804
803
}
805
804
}
806
805
return needsInteropMismatch
You can’t perform that action at this time.
0 commit comments