We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3334f58 commit f8d9ab1Copy full SHA for f8d9ab1
index.js
@@ -6,7 +6,10 @@ function mapOptions (opts) {
6
opts = xtend({
7
ecmaVersion: 2019,
8
allowHashBang: true,
9
- allowReturnOutsideFunction: true
+ allowReturnOutsideFunction: true,
10
+ plugins: {
11
+ dynamicImport: opts.sourceType === 'module'
12
+ }
13
}, opts)
14
opts.plugins = xtend(opts.plugins, {})
15
return opts
@@ -23,3 +26,5 @@ module.exports = exports = xtend(acorn, {
23
26
return acorn.tokenizer(src, mapOptions(opts))
24
27
}
25
28
})
29
+
30
+require('acorn-dynamic-import/lib/inject').default(exports)
package.json
@@ -8,6 +8,7 @@
},
"dependencies": {
"acorn": "^5.6.2",
+ "acorn-dynamic-import": "^3.0.0",
"xtend": "^4.0.1"
"devDependencies": {
0 commit comments