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