From a92b549336a722620656b9547eb21f86866db82b Mon Sep 17 00:00:00 2001 From: Yui T Date: Wed, 14 Jun 2017 21:50:12 -0700 Subject: [PATCH] Set the structureReused to be safemoudles when dynamic import change --- src/compiler/program.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/program.ts b/src/compiler/program.ts index dd29588593a..e8b07b4646f 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -804,7 +804,7 @@ namespace ts { } if ((oldSourceFile.flags & NodeFlags.PossiblyContainsDynamicImport) !== (newSourceFile.flags & NodeFlags.PossiblyContainsDynamicImport)) { // dynamicImport has changed - oldProgram.structureIsReused = StructureIsReused.Not; + oldProgram.structureIsReused = StructureIsReused.SafeModules; } if (!arrayIsEqualTo(oldSourceFile.typeReferenceDirectives, newSourceFile.typeReferenceDirectives, fileReferenceIsEqualTo)) {