Replies: 2 comments 3 replies
-
afaik I don't think we have graceful way to make things work magically for this. Probably best bet is puzzling with include / exclude in preset-env (https://github.com/swc-project/swc/blob/main/node-swc/src/types.ts#L598-L602=) to swc do best attempt to skip certain transforms. |
Beta Was this translation helpful? Give feedback.
3 replies
-
Maybe it's possible to chain a swc after babel transforms jsx and other things, but I'm not sure about potential performance. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello!
I'm currently working in a build environment that is heavily reliant on babel. I'm hoping to try to swap certain pieces of the build out with swc without needing to convert everything, the first target being
babel-preset-env
. I see SWC has support for the preset-env functionality, but I'm curious if it's possible to target that specific part of the swc process throughswc-loader
. At which point, we would hand the rest off to subsequent loaders.I was looking through these docs and did not find exactly what I'm looking for:
Here's an example WIP diff: https://github.com/gatsbyjs/gatsby/compare/preset-env-with-swc
Beta Was this translation helpful? Give feedback.
All reactions