Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support swc plugin #8613

Open
takkuumi opened this issue Nov 9, 2022 · 9 comments
Open

Support swc plugin #8613

takkuumi opened this issue Nov 9, 2022 · 9 comments

Comments

@takkuumi
Copy link

takkuumi commented Nov 9, 2022

I want to use an swc plugin swc-plugin-transform-vue3-jsx for jsx, but parcel has no way to add swc plugin.

@mischnic mischnic added the swc label Nov 9, 2022
@github-actions github-actions bot added the Stale Inactive issues label May 8, 2023
@parcel-bundler parcel-bundler deleted a comment from github-actions bot May 8, 2023
@mischnic mischnic added 🙋‍♀️ Feature Stale Inactive issues and removed Stale Inactive issues labels May 8, 2023
@jhsware
Copy link

jhsware commented Sep 20, 2023

We would like to use swc-plugin-inferno instead of the default React JSX transformer.

#9236

@ottoborden
Copy link

Any update on this?

@danieltroger
Copy link
Contributor

We'd like to use this SWC plugin because then we can stop using babel and get faster builds but it doesn't seem possible? https://www.npmjs.com/package/@swc/plugin-emotion

@quilicicf
Copy link

It looks like this is related to the support of .swcrc (seeing #6335).

Doesn't it boil down to activating the configuration option swcrc everywhere Parcel uses SWC?

Looks like an easy win, considering I only see a few locations where SWC is called in the code:

Am I completely off track? 🤔

@mischnic
Copy link
Member

mischnic commented Jul 2, 2024

The place where additional swc transformer plugins should run is https://github.com/parcel-bundler/parcel/blob/v2/packages/transformers/js/core/src/lib.rs

@mischnic
Copy link
Member

mischnic commented Jul 2, 2024

Or alternatively as a separate transformer, doing something like #9826

@quilicicf
Copy link

Thanks for your answers @mischnic.

What about supporting the .swcrc by default, tho ? What would it take ? 🤔

My use case is supporting TS decorators.

Should I also use a dedicated transformer ? It looks like it could break earlier if SWC parses the code before transformation.

@quilicicf
Copy link

Interesting (kind of a conf maze though).
Thanks for the pointer, I'll try it, I have metadata in my decorators though, not sure this'll work without the SWC config.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants