-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
Add swc transpilation behind a flag #11739
Add swc transpilation behind a flag #11739
Conversation
Currently swc doesn't support Flow they are considering it, if they do we can revert this commit swc-project/swc#256
setting path=paths.appPath did not work https://swc.rs/docs/configuration/supported-browsers#path Also enabled requre resolve to allow extending from packages
Will it land with CRA5? :))) |
3 options as it removes support for Flow (on the short run) it's a breaking change - could be in v5, v6 or not at all 🙂 |
We might add this behind a flag in 5.x to gather feedback for v6 |
Thanks @raix It would fantastic to have this behind a FF for 5.x to benchmark on larger projects. |
This reverts commit 6f9083b.
Move dependency loading into the loader call
Since we are adding json5 in this pr we should fix #7426 in the same go |
Using JSON5 as projects with jsconfig.json might not have TypeScript installed - eg. VS Code reads the config + SWC is also configured via jsconfig.json in projects without TypeScript.
@mrmckeb regarding #7426 this pr adds support for comments in jsconfig.json - the pr uses jsconfig.json to configure swc language features - a project could then use |
Hi. I'm the author of the swc project. I'm curious if there's something I can help.
Does this still apply? I'm not sure if it's the case, and I'm also curious about tasks left. |
Thanks @kdy1 this pr doesn't remove babel transform due to eslint, it sounds like it could be fairly trivial to create a swc-parser for eslint, if the espree ast is already in swc? |
Yeah, I think so. It needs more testing about But I'm not sure about the API for it. Does |
Hi @raix will it be possible to make some progress here and maybe land it in 5.0.2 ? |
Would be awesome if anyone is up for taking over this pr - I'm currently out of time 🙏 |
@raix |
I think to remember that it was eslint only using babel - not sure if there's a eslint-swc parser. (It's along time ago since I did this work) Congrats on you 25th b-day btw 🙂 |
Thank you! |
This pr swaps out babel and use swc for transpiling code building/testing
Overview:
use ts-jest for jest ts/tsx file transformation (keeping an eye on stc)(keeping the scope of the pr to swc)QA project tsconfig is loaded in ts-jestSWC_TRANSFORM
jsconfig.json
- we use this file to configure swc in non TypeScript projectsNotes:
Dependency updates:
27.4.4
BREAKING CHANGE: