Closed JealousyProgress closed 6 months ago
The import plugin has nothing to do with dynamic import, and that particular parsing error indicates that index.js
is using a static import in the wrong place. What's in src/index.js
?
document.getElementById('btn').onclick = function () { import('./utils/sum.js').then(({sum}) => { console.log(sum(1, 2, 3)) }) } only this case , close this case , build success, open this case , terminal console that error
Your ecmaVersion is set to 6, which is ES2015, which doesn't have dynamic import. This has nothing to do with the import plugin - you'll need to use a later ecmaVersion.
when i use dynamic import and build project terminal console error![无标题](https://github.com/import-js/eslint-plugin-import/assets/156172644/eb9ff6cb-89b6-42c0-a63e-8af71c3c5097)