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

Switch to SWC #442

Draft
wants to merge 4 commits into
base: 5.x-RC
Choose a base branch
from
Draft

Switch to SWC #442

wants to merge 4 commits into from

Conversation

kmonahan
Copy link
Contributor

@kmonahan kmonahan commented Apr 1, 2024

No description provided.

@timnolte
Copy link
Contributor

timnolte commented Apr 1, 2024

Is it appropriate to do this without @wordpress/scripts making that change also?

@tropicandid
Copy link
Contributor

Could we also get a description for what this change fixes/improves? I'm not super familiar with SWC.

@kmonahan
Copy link
Contributor Author

kmonahan commented Apr 1, 2024

SWC is a Babel replacement -- same thing, just does it with Rust. Gesso Drupal/GUSWDS and Gesso for React have switched, so this PR brings that same change to Gesso WP. Since Gesso WP doesn't use @wordpress/scripts (or at least, I don't see that in the package dependencies here), I don't think that has an impact here, but really for the Gesso WP Working Group to decide.

@timnolte
Copy link
Contributor

timnolte commented Apr 1, 2024

So, actually, I think that moving to @wordpress/scripts should actually be on the list of things to do and clean up all of the individual @wordpress packages that are being included. However, that change aside, it does use @wordpress/babel-preset-default and from what I've seen that is not compatible with SWC correct, or has that been addressed in newer versions of SWC?

@timnolte
Copy link
Contributor

timnolte commented Apr 1, 2024

Hmm, looks like this PR is removing @wordpress/babel-preset-default, I'm not so sure that is an appropriate course to take for a WordPress block-based theme.

@kmonahan
Copy link
Contributor Author

kmonahan commented Apr 1, 2024

Correct, it is removing Babel-related plugins along with Babel. @timnolte What is the planned timeline for replacing the existing build tools with @wordpress/scripts? If it's soon, then agree there's no reason to switch to SWC and switch back. I hadn't heard that update was in the works.

@tropicandid
Copy link
Contributor

We discussed nixing this PR in favor of working to introduce wp_scripts and concurrently upgrading to node 20. Please see issue #449. Converting this to draft.

@tropicandid tropicandid marked this pull request as draft May 22, 2024 19:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants