From 15ef20db3c702e227f3d32ff8a3b9436067e04a2 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 51288821cab6a..7e5bba35e44d3 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)) {