Opened 7 weeks ago
Last modified 6 weeks ago
#64958 new enhancement
Copy React vendor scripts from Gutenberg, update version number
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | 7.1 | Priority: | normal |
| Severity: | normal | Version: | |
| Component: | Build/Test Tools | Keywords: | has-patch has-unit-tests |
| Focuses: | Cc: |
Description
Gutenberg started building its own bundles for the react, react-dom and react-jsx-runtime vendor 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'll copy them from the Gutenberg build.
We'll also update the version strings of the packages by appending a -wp suffix, 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.
Change History (5)
This ticket was mentioned in PR #11359 on WordPress/wordpress-develop by @jsnajdr.
7 weeks ago
#1
- Keywords has-patch has-unit-tests added
#2
@
7 weeks ago
- Milestone changed from Awaiting Review to 7.1
- Version trunk deleted
@jsnajdr Is this a requirement for the 7.0 release? If not, we should hold off on merging this at least until after branching, preferably after 7.0 is released just to give it some proper testing and confirmation given the volume of changes to the build script this cycle.
#3
@
7 weeks ago
Waiting for 7.1 is fine, because 7.0 is not broken in any way. The corresponding Gutenberg fixes are urgent, because the equivalent Gutenberg functionality is broken, but the backport is not.
@Mamaduka commented on PR #11359:
6 weeks ago
#4
We also update the version strings of the packages by appending a -wp suffix, 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.
We should probably get wider feedback on this new suffix. IIRC, WP always used version numbers for scripts, but vendors might be excluded from this policy.
cc @desrosj, @peterwilsoncc
@desrosj commented on PR #11359:
6 weeks ago
#5
Noting that I've seen this and it's on my list, but there are still build script bugs that need to be ironed out for 7.0. So I'm prioritizing those first.
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: https://github.com/WordPress/gutenberg/pull/74343 and https://github.com/WordPress/gutenberg/pull/76811
## Use of AI Tools
Autocomplete with Cursor and Opus 4.6.