support babel's import syntax
See original GitHub issueTrying to work with a webpack bundle using babel to compile ES6 files and work with:
import DefaultExport from './File';
The inject loader doesn’t work and ends up with:
TypeError: Cannot read property 'default' of undefined
at inject (webpack:///./File.es6?./~/inject-loader:5:91)
at Context.eval (webpack:///./test/File.es6?:19:17)
Issue Analytics
- State:
- Created 8 years ago
- Comments:14 (6 by maintainers)
Top Results From Across the Web
babel/plugin-syntax-dynamic-import
Working with Webpack and @babel/preset-env. Currently, @babel/preset-env is unaware that using import() with Webpack relies on Promise internally.
Read more >Using ES6 syntax “import/export” in Node js with Babel
Babel allows us to convert ES6(ECMAScript 2015+) codes(syntax) into backward-compatible versions of Javascript that can be run by older Javascript engines.
Read more >@babel/plugin-syntax-import-assertions - npm
Start using @babel/plugin-syntax-import-assertions in your project by running `npm i @babel/plugin-syntax-import-assertions`.
Read more >Use import statement in Babel plugin - Stack Overflow
I'm currently writing a babel plugin. I have a folder called plugin a package.json and the following file: // index.js import template from ......
Read more >type-only imports — A new TypeScript feature that benefits ...
Example 1 — Ambiguous re-export · Babel removes everything from our types module because it only contained types, which have no use in...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
FYI, this appears to be broken in
3.0.0-beta2
. We downgraded to2.0.1
and it worked.OK, I’ve published
2.0.1
, which should hopefully fix the issues with Babel generated code. Please have a look and open a new issue if there are dramas. ❤️