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.

Add support for Babel 7

See original GitHub issue

Hi there!

Just wanted to point out that inject-loader doesn’t work properly with Babel 7.

Running my tests suite I get this error whenever inject-loader is imported in my tests:

Module parse failed: 'import' and 'export' may only appear at the top level (975:4)
You may need an appropriate loader to handle this file type.

Maybe is due to the hardcoded usage of the deprecated babel-core module inside inject-loader? 🤔

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:18
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

13reactions
miquelmasrieramrfcommented, Sep 21, 2018

that would be nice! In the meantime if you want to use inject-loader with babel7, you can use @babel/plugin-transform-modules-commonjs. It will transform the modules to commonjs so the loader will work

11reactions
plasticinecommented, Sep 4, 2018

@matteoantoci Hey thanks for the report, I’ll try and find time to have a look 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Upgrade to Babel 7
Refer users to this document when upgrading to Babel 7. ... To do this automatically you can run npx babel-upgrade (PR added here)....
Read more >
Add support for Babel 7 · Issue #1497 · stealjs/steal - GitHub
Keep the same module name. It's a test module so we won't be publishing it in the @babel/ org. This means we need...
Read more >
Babel 7: Configuration, Preset, and Plugin Usage
There are several ways to install Node.js, you can consult them at https://nodejs.org/en/ . Babel 7 no longer supports Node.js versions 0.10 ...
Read more >
babel-plugin-dynamic-import-node-babel-7 - npm - Snyk
Learn more about babel-plugin-dynamic-import-node-babel-7: package health ... check on: Github This fork was created to add support for Babel 7: Github.
Read more >
babel-plugin-module-resolver - npm
A Babel plugin to add a new resolver for your modules when compiling your code using Babel. This plugin allows you to add...
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