File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -3700,7 +3700,7 @@ namespace ts {
3700
3700
// 3)we have a MemberExpression which either completes the LeftHandSideExpression,
3701
3701
// or starts the beginning of the first four CallExpression productions.
3702
3702
let expression : MemberExpression ;
3703
- if ( token ( ) === SyntaxKind . ImportKeyword ) {
3703
+ if ( token ( ) === SyntaxKind . ImportKeyword && lookAhead ( nextTokenIsOpenParenOrLessThan ) ) {
3704
3704
// We don't want to eagerly consume all import keyword as import call expression so we look a head to find "("
3705
3705
// For example:
3706
3706
// var foo3 = require("subfolder
Original file line number Diff line number Diff line change @@ -802,6 +802,10 @@ namespace ts {
802
802
// moduleAugmentations has changed
803
803
oldProgram . structureIsReused = StructureIsReused . SafeModules ;
804
804
}
805
+ if ( ( oldSourceFile . flags & NodeFlags . PossiblyContainsDynamicImport ) !== ( newSourceFile . flags & NodeFlags . PossiblyContainsDynamicImport ) ) {
806
+ // dynamicImport has changed
807
+ oldProgram . structureIsReused = StructureIsReused . Not ;
808
+ }
805
809
806
810
if ( ! arrayIsEqualTo ( oldSourceFile . typeReferenceDirectives , newSourceFile . typeReferenceDirectives , fileReferenceIsEqualTo ) ) {
807
811
// 'types' references has changed
You can’t perform that action at this time.
0 commit comments