Skip to content

Commit b97241f

Browse files
authored
fix: Enable dynamicImport plugin to support import() syntax (#903)
Fixes #902
1 parent 67c0a29 commit b97241f

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

Diff for: __tests__/fixture/es6-import.input.js

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ import hasEx6 from './es6-ext';
22
import multiply from './simple.input.js';
33
import * as foo from 'some-other-module';
44

5+
import('./simple.input.js').then(() => {});
6+
57
/**
68
* This function returns the number one.
79
* @returns {Number} numberone

Diff for: src/parsers/parse_to_ast.js

+8-10
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,18 @@ var opts = {
66
allowImportExportEverywhere: true,
77
sourceType: 'module',
88
plugins: [
9-
'jsx',
10-
'flow',
11-
'asyncFunctions',
9+
'asyncGenerators',
1210
'classConstructorCall',
13-
'doExpressions',
14-
'trailingFunctionCommas',
15-
'objectRestSpread',
16-
'decorators',
1711
'classProperties',
12+
'decorators',
13+
'doExpressions',
1814
'exportExtensions',
19-
'exponentiationOperator',
20-
'asyncGenerators',
15+
'flow',
2116
'functionBind',
22-
'functionSent'
17+
'functionSent',
18+
'jsx',
19+
'objectRestSpread',
20+
'dynamicImport'
2321
]
2422
};
2523

0 commit comments

Comments
 (0)