regeneratorRuntime is not defined in build output
See original GitHub issueAttempting packemon for a project. Its building the project fast without errors. But the output contains references to regeneratorRuntime
which is not in scope. Checking this SO question it says the @babel/plugin-transform-runtime
plugin should be used… but I am not sure how to add that as packemon uses its internal babel configuration? Is there a way to extend it / add a plugin for it?
You can reproduce it by cloning the fix-web-api-issues
branch here. Running node lib/bin.js
should not throw.
Thanks 😁
Issue Analytics
- State:
- Created 3 years ago
- Comments:16 (10 by maintainers)
Top Results From Across the Web
How to fix regeneratorRuntime is not defined?
I have ran into a problem, the error is regeneratorRuntime is not defined while working with React and Parcel bundler.
Read more >ReferenceError regeneratorRuntime is not defined · Issue #9849
I'm building an SSR template, and when I use @babebl/register and then execute webpack (config), the system reported an error.
Read more >Babel 6 regeneratorRuntime is not defined - Stack Overflow
When using webpack-dev-server with HMR, doing this reduced the number of files it has to compile on every build by quite a lot....
Read more >T286846 ReferenceError: regeneratorRuntime is not defined
34, [Chrome 90.0.4430.93 linux #0-0] regeneratorRuntime is not defined ... (ack is a command line search tool. ack -cl regeneratorRuntime will output how ......
Read more >Parcel, how to fix the `regeneratorRuntime is not defined` error
I run into this problem in a project using Babel as soon as I added an async function, but the problem is the...
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
Awesome, glad to hear!
I’ll look into the node polyfills piece.
As for the runtime, you would need to add the
@babel/runtime
dep to your project, since it requires it. https://packemon.dev/docs/setup#transforming-generators