Skip to content

Conversation

@dmsnell
Copy link
Owner

@dmsnell dmsnell commented Jan 19, 2026

IGNORE: DO NOT MERGE

Trac ticket: Core-64393

The purpose of this ticket is to gather all of the changes in the sequence of patches which have been applied in order to close Core-64393 “Change how we include Gutenberg in Core.”

This is not meant for merge, but only for assessing the sum total of the change in an isolated context. This is what a single commit should/would look like had the work been applied in an atomic change.

youknowriad and others added 12 commits January 19, 2026 16:12
This changes WordPress Core's Gutenberg integration from npm packages to checking out and building Gutenberg directly. Instead of syncing individual npm packages, Core now checks out the Gutenberg repository, builds it, and copies the build artifacts.

This enables Core to use Gutenberg's advanced features like route-based navigation, full-page rendering, and the Font Library, while also streamlining future updates.

New commands:
  * `npm run gutenberg:checkout` - Clones Gutenberg at a specified ref
  * `npm run gutenberg:build` - Runs Gutenberg's build process
  * `npm run gutenberg:copy` - Copies and transforms build output to Core
  * `npm run gutenberg:integrate` - Runs all three steps

Main changes:
  * Removes webpack configs replaced by Gutenberg's build (blocks.js, packages.js, script-modules.js, development.js, vendors.js)
  * Adds Font Library page (`/wp-admin/font-library.php`)
  * Adds copy scripts to transform Gutenberg plugin paths to Core paths
  * Moves vendor copy step from webpack to Gruntfile

New year, new process. Happy New Year!

Props youknowriad, ellatrix, sirreal, westonruter, desrosj, tellthemachines.
Fixes #64393.

git-svn-id: https://develop.svn.wordpress.org/trunk@61438 602fd350-edb4-49c9-b593-d223f7449a82
(cherry picked from commit 22294af)
…-i18n.json handling.

This changeset addresses two issues in the Gutenberg integration workflow:

 * Sets `wpPlugin.name` to `wp` in `build-gutenberg.js` so generated PHP files use `wp_` prefixes instead of `gutenberg_`.
 * Persists `theme-i18n.json` in the repository for WP-CLI compatibility, as this file is required but was being ignored.

Props youknowriad, swissspidy.
See #64393.

git-svn-id: https://develop.svn.wordpress.org/trunk@61439 602fd350-edb4-49c9-b593-d223f7449a82
(cherry picked from commit b83d3bc)
Updates the Gutenberg ref to include changes that generate both minified and non-minified CSS files during build. Previously, the build only produced a single CSS file (e.g., `style.css`), causing missing asset errors when `SCRIPT_DEBUG` is set to `false`, as Core expects `.min.css` files.

Props peterwilsoncc, dd32, tyxla, jsnajdr, mcsf.
Fixes #64393.

git-svn-id: https://develop.svn.wordpress.org/trunk@61446 602fd350-edb4-49c9-b593-d223f7449a82
(cherry picked from commit 35313fa)
Adds the `--fast` flag to Gutenberg build commands, which skips TypeScript-related steps (version validation, `tsc --build`, and type declaration file checks) that aren't needed when building for WordPress Core. These steps only produce `.d.ts` files which aren't shipped with Core. Also updates the Gutenberg ref to include the commit that adds `--fast` flag support.

The build times are now comparable to the build times we had using the npm packages.

Props dmsnell, johnbillion.
See #64393.

git-svn-id: https://develop.svn.wordpress.org/trunk@61450 602fd350-edb4-49c9-b593-d223f7449a82
(cherry picked from commit 425bc36)
This separates dependency setup from the build process by running
the Gutenberg checkout during npm install rather than before each
build. Build times decrease by approximately 30 seconds since the
checkout now occurs once during installation.

Props youknowriad, dmsnell.
See #64393.

git-svn-id: https://develop.svn.wordpress.org/trunk@61458 602fd350-edb4-49c9-b593-d223f7449a82
(cherry picked from commit bc567fd)
The function was removed in [61438] but should have been deprecated instead of removed outright, per WordPress backward compatibility policy.
Hot reloading is not used anymore in the latest Gutenberg build tool.

Props peterwilsoncc, westonruter.
See #64393.

git-svn-id: https://develop.svn.wordpress.org/trunk@61472 602fd350-edb4-49c9-b593-d223f7449a82
(cherry picked from commit 470fcfe)
Adds `svn:ignore` entries for Gutenberg-generated files that were added to `.gitignore` in [61438].

The following entries were added:
* Root directory: `gutenberg`
* `src/wp-includes`: `blocks`, `build`, `class-wp-block-parser-block.php`, `class-wp-block-parser-frame.php`, `theme.json`

Props peterwilsoncc.
See #64393.


git-svn-id: https://develop.svn.wordpress.org/trunk@61476 602fd350-edb4-49c9-b593-d223f7449a82
Restores the `wp_register_development_scripts()` function and associated
build infrastructure to enable hot module replacement (HMR) when using
`@wordpress/scripts` with the `--hot` flag.

The React Refresh scripts were removed in [61438] as part of the Gutenberg
build restructuring, but they are still needed for plugin developers using
`wp-scripts start --hot` for block development.

Props jsnajdr, wildworks, manzoorwanijk.
See #64393.

git-svn-id: https://develop.svn.wordpress.org/trunk@61487 602fd350-edb4-49c9-b593-d223f7449a82
(cherry picked from commit e34ed7c)
Adds the missing `tools/webpack/development.js` file that was inadvertently
omitted from [61487].

See #64393.

git-svn-id: https://develop.svn.wordpress.org/trunk@61488 602fd350-edb4-49c9-b593-d223f7449a82
(cherry picked from commit 1af331f)
This is just an empty commit to unblock the sync.

Props aidvu.

git-svn-id: https://develop.svn.wordpress.org/trunk@61489 602fd350-edb4-49c9-b593-d223f7449a82
(cherry picked from commit 1fdc11a)
This changeset improves the Gutenberg build integration to simplify the developer workflow and reinstore a flow similar to how package dependencies worked before the Gutenberg checkout-and-build approach was introduced.

Key improvements:
* Automatic rebuild on ref change: Adds a new `gutenberg:sync` script that stores a hash of the built ref in `.gutenberg-hash` and only rebuilds when the ref changes.
* Full integration on `npm install`: Running `npm install` now produces a fully working development environment with Gutenberg assets in `src/`.
* Clean Gutenberg checkout: Restores Gutenberg's `package.json` after the build completes.
* Stops copying `.js.map` files to `wp-includes/js/dist` since they reference non-existent paths.
* Remove package.json files from the build folder.
* Avoid closures and use prefixed functions.
* Updates build checks to use `jquery.js` instead of `edit-post.js` as the build indicator.

Props youknowriad, ellatrix, mcsf, dmsnell, ntsekouras, jorgefilipecosta, tobiasbg, peterwilsoncc.
Fixes #64393.

git-svn-id: https://develop.svn.wordpress.org/trunk@61492 602fd350-edb4-49c9-b593-d223f7449a82
(cherry picked from commit e626725)
The work in [61438] for Core-64393 removed the block parser classes from Core, which caused numerous scripts to fail because they were missing. Conditional checks were added in [61492] which left WordPress in an inoperable state.

This patch restores the block parser in Core, in preparation for work to remove it from Gutenberg (in a separate patch).

Ironically, the files were removed because the new build was copying them over from Gutenberg and the intent was to avoid having two sources of truth, but this was previously the existing mechanism, so having done nothing to the parser files would have left the status quo. This patch removes the problems originally created by removing the files. They will not be copied from Gutenberg any more and the only source of truth will be Core.

Until removed from Gutenberg, because of the build changes, any changes made on the Gutenberg side will be lost unless manually copied over.

Developed in: WordPress#10761
Discussed in: https://core.trac.wordpress.org/ticket/64521

Follow-up to [61438], [61492].

Props dmsnell, mcsf, mukesh27, youknowriad.
Fixes #64521.


git-svn-id: https://develop.svn.wordpress.org/trunk@61504 602fd350-edb4-49c9-b593-d223f7449a82
@dmsnell dmsnell force-pushed the examine/build-change branch from 996007c to d4a85b7 Compare January 20, 2026 23:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants