forumone / gesso-wp

Gesso WordPress theme
34 stars 17 forks source link

Switch to SWC #442

Open kmonahan opened 7 months ago

timnolte commented 7 months ago

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

tropicandid commented 7 months ago

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

kmonahan commented 7 months ago

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 commented 7 months ago

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 commented 6 months ago

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 commented 6 months ago

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 commented 5 months ago

We discussed nixing this PR in favor of working to introduce wp_scripts and concurrently upgrading to node 20. Please see issue https://github.com/forumone/gesso-wp/issues/449. Converting this to draft.