packemon: regeneratorRuntime is not defined in build output
Attempting 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 😁
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 16 (10 by maintainers)
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-generatorsThat’s odd since node platform enforces async/await always. Will take a look!