babel 7 with dynamic requires does not work
See original GitHub issue🐛 Bug Report
When using Babel 7, Jest does not transform dynamic required files. Babel 6 works as expected.
This is a continuation of https://github.com/facebook/jest/issues/7021.
Link to repl or repo (highly encouraged)
Run npx envinfo --preset jest
Paste the results here:
System:
OS: macOS 10.14.1
CPU: (16) x64 Intel(R) Xeon(R) W-2140B CPU @ 3.20GHz
Binaries:
Node: 10.13.0 - ~/.nvm/versions/node/v10.13.0/bin/node
npm: 6.4.1 - ~/.nvm/versions/node/v10.13.0/bin/npm
npmPackages:
jest: 23.6.0 => 23.6.0
Issue Analytics
- State:
- Created 5 years ago
- Comments:18 (4 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 >Babel 7 and preset-es2015 don't work together - Stack Overflow
Now, running NODE_ENV=development node bootstrap.js gives me another error: Error: Requires Babel "^7.0.0-0", ...
Read more >babel-plugin-dynamic-import-node-babel-7 - npm - Snyk
Babel plugin to transpile import() to a deferred require(), for node For more information about how to use this package see ... No...
Read more >babel-plugin-dynamic-import-node | Yarn - Package Manager
Babel plugin to transpile import() to a deferred require() , for node. Matches the proposed spec. NOTE: Babylon >= v6.12.0 is required to...
Read more >dynamic import can only be supported when transforming es ...
Would you like to work on a fix? How are you using Babel? @babel/cli. Input code. Anything. Configuration file name. No response. Configuration....
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 Free
Top 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
You have to add an custom transformer to solve this Babel 7 issues… I have added a Pull request to your repository wich solves it
I just wanted to confirm that this issue has been fixed with
jest@24.0.0-alpha.12
. Thank you!!