[wp-trac] [WordPress Trac] #64393: Change how we include Gutenberg in Core

WordPress Trac noreply at wordpress.org
Wed Jan 7 03:56:03 UTC 2026


#64393: Change how we include Gutenberg in Core
------------------------------+--------------------------
 Reporter:  youknowriad       |       Owner:  youknowriad
     Type:  task (blessed)    |      Status:  reopened
 Priority:  high              |   Milestone:  7.0
Component:  Build/Test Tools  |     Version:
 Severity:  blocker           |  Resolution:
 Keywords:  has-patch         |     Focuses:
------------------------------+--------------------------

Comment (by dmsnell):

 The `checkout-gutenberg.js` script unconditionally checks out the
 Gutenberg repository, and it grabs every single reference in the repo.
 After checking out it contains **1.8 GB** on my machine as I write this
 comment.

 It makes multiple rounds of `git` fetching and introduces network
 dependencies into the Core development workflow, making a build fail when
 unable to reach the Internet.

 This has added many minutes to my local build, which otherwise is
 practically instant with `php -S 0.0.0.0 -t ./src`. Core already required
 building the JS files, but this adds another step which is serial,
 unnecessary, and network-dependent.

 It also seems to run `git checkout FETCH_HEAD` which could be combined
 into the previous fetch, which could be combined into the previous clone.

 The `npm ci` step is particularly egregious, which in the case of building
 a release or running CI jobs seems very appropriate, but it intentionally
 deletes all 1.8 GB of packages, reruns the dependency resolution when it
 doesn’t need to, re-downloads every package, and builds everything, when
 nothing has changed or needs to change. This unfortunate waste of time
 could be avoided by a number of different mitigations, including an
 optimization that checks if any of this work is necessary before doing it
 every single time.

 I would like to propose that we add these steps for now //only// with the
 addition of some new CLI arg or ENV value. It’s too costly to introduce
 this heavy overhead for every change or invocation of any development
 server, and until the new build is less disruptive, why not make it opt-in
 to isolate the damage to where it’s value is necessary?

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/64393#comment:41>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list