Not sure whether I need regenerator-runtime
as a dependency in my project
#9182
Unanswered
ChristophP
asked this question in
Q&A
Replies: 1 comment 1 reply
-
I think the answer is no, swc uses its own helper for transpiling async/await Parcel 2 uses swc with |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Before Parcel v2, I used Parcel v1 along with babel to transpile my JS code. It needed
core-js
for a bunch of polyfills andregenerator-runtime
as to transpile async functions. I couldn't find a sufficient clarification on this in the docs.Since Parcel v2, I got a bunch of messages that babel is not needed if I only need transpilation for certain things, which fit my case. I removed babel and relied on the transpilation offered by (I assume) swc alone.
This works well, However I recently noticed that I still have
regenerator-runtime
(andcore-js
for that matter) in my dependencies which is not imported anywhere in my source code (but previously dynamically injected by babel IIRC).So my question due to lacking understanding of what parcel does under the hood: If I'm using async function, transpiling for the browser and use no babel rc with my parcel v2 setup, do I still need
regenerator-runtime
as a dependency?Thanks in advance for the clarification.
Beta Was this translation helpful? Give feedback.
All reactions