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

Implement SWC plugin #487

Closed
nicksrandall opened this issue Feb 27, 2023 · 5 comments
Closed

Implement SWC plugin #487

nicksrandall opened this issue Feb 27, 2023 · 5 comments

Comments

@nicksrandall
Copy link

I'd like to help port the babel plugin to SWC. Can somebody please explain what the differences are between the react version and the Preact version? I plan to start with the react version (already ported) and make the necessary changes to support Preact.

@Hideman85
Copy link

Hideman85 commented Jun 23, 2023

+1 I also would like to se a SWC implementation therefore it would be a lot faster than babel like vite seem to move to SWC as well for the same reasons https://github.com/vitejs/vite-plugin-react-swc/blob/main/src/refresh-runtime.js

@JoviDeCroock
Copy link
Member

Hey, on the Babel side of things the two transforms are almost identical. The main difference in the Preact one is that we have this part extra to maintain and reset context references correctly

@f0am

This comment was marked as off-topic.

@colinaaa
Copy link

A SWC plugin has been implemented at swc-project/plugins#326

@JoviDeCroock
Copy link
Member

It's also published! https://www.npmjs.com/package/@swc/plugin-prefresh

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

No branches or pull requests

5 participants