Closed duncanbeevers closed 5 years ago
@duncanbeevers I think correct syntax is import 'bootstrap';
. Isn't it?
Babel's documentation also say import 'bootstrap';
is correct.
Yes, that's right. I've corrected the description to reflect this. The error described is still valid.
Codegen of side-effect imports was wrong.
import 'sideeffect'
is converted to import from 'sideeffect';
I'll fix it soon
@babel/helper-module-imports
permits import statements with no identifier to establish dependencies between files without exposing a javascript expression for that import.https://babeljs.io/docs/en/babel-helper-module-imports
Common usage looks like
swc / swc-loader doesn't recognize this form of import statement, and throws.
Expected behavior
A dependency should be established between the parent and referenced file; no javascript expression representing the imported resource should be generated.