question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

support babel's import syntax

See original GitHub issue

Trying 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:closed
  • Created 8 years ago
  • Comments:14 (6 by maintainers)

github_iconTop GitHub Comments

8reactions
andyperlitchcommented, Oct 12, 2016

FYI, this appears to be broken in 3.0.0-beta2. We downgraded to 2.0.1 and it worked.

0reactions
plasticinecommented, Aug 5, 2015

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. ❤️

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found