Skip to content

Commit a92b549

Browse files
author
Yui T
committed
Set the structureReused to be safemoudles when dynamic import change
1 parent f66ad03 commit a92b549

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/compiler/program.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -804,7 +804,7 @@ namespace ts {
804804
}
805805
if ((oldSourceFile.flags & NodeFlags.PossiblyContainsDynamicImport) !== (newSourceFile.flags & NodeFlags.PossiblyContainsDynamicImport)) {
806806
// dynamicImport has changed
807-
oldProgram.structureIsReused = StructureIsReused.Not;
807+
oldProgram.structureIsReused = StructureIsReused.SafeModules;
808808
}
809809

810810
if (!arrayIsEqualTo(oldSourceFile.typeReferenceDirectives, newSourceFile.typeReferenceDirectives, fileReferenceIsEqualTo)) {

0 commit comments

Comments
 (0)