Copy React vendor scripts from Gutenberg, update version number#11359
Copy React vendor scripts from Gutenberg, update version number#11359jsnajdr wants to merge 1 commit intoWordPress:trunkfrom
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
|
|
||
| /* | ||
| * Append '.1' to the version number for React and ReactDOM. | ||
| * Append '-wp' to the version number for React and ReactDOM. |
| * This can be removed in the next update to the packages. | ||
| * This can be removed in the next update to the packages (to React 19). | ||
| * | ||
| * See https://core.trac.wordpress.org/ticket/62422 |
There was a problem hiding this comment.
Worth also adding https://core.trac.wordpress.org/ticket/64958 for context?
If I'm reading it correctly, the previous ticket refers to switching to UMD builds, and this PR is switching away.

Gutenberg started building its own bundles for the
react,react-domandreact-jsx-runtimevendor scripts. Previously we've been copying React's own UMD bundles shipped as part of their NPM packages, but React 19 is going to remove these UMD bundles, and we are preparing for the migration by abandoning the UMD bundles in advance.Instead of copying the UMD files, we copy them from the Gutenberg build.
We also update the version strings of the packages by appending a
-wpsuffix, so that we can differentiate them from previous versions. Even though it's still the same React 18.3.1, the build method has changed.Trac ticket: https://core.trac.wordpress.org/ticket/64958
Backports Gutenberg PR: WordPress/gutenberg#74343 and WordPress/gutenberg#76811
Use of AI Tools
Autocomplete with Cursor and Opus 4.6.