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

WordPress Trac noreply at wordpress.org
Wed Feb 18 19:29:04 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 ellatrix):

 In [changeset:"61677" 61677]:
 {{{
 #!CommitTicketReference repository="" revision="61677"
 Build: Remove all sourceMappingURL comments when copying Gutenberg files.

 The `removeSourceMaps` regex in `copy-gutenberg-build.js` was missing the
 `/g` (global) flag, so it only stripped the **first** `//#
 sourceMappingURL=` comment per file.

 Bundled files such as the `@wordpress/vips` web worker can contain
 **multiple** `sourceMappingURL` references from concatenated modules
 (esbuild builds worker bundles with `sourcemap: true`, and when webpack
 bundles the module entry point it preserves comments from source modules).
 This causes the `verify:source-maps` build check to fail:

 ```
 Warning: The build/wp-includes/js/dist/script-modules/vips/worker.js file
 must not contain a sourceMappingURL.
 ```

 Adding the `/g` flag ensures every occurrence is removed, consistent with
 the existing `replace:source-maps` Grunt task which already uses the
 global flag.

 Fixes the build failure reported in https://github.com/WordPress
 /wordpress-develop/pull/10968#issuecomment-3920484908.

 Developed in https://github.com/WordPress/wordpress-develop/pull/10970.

 Props adamsilverstein.
 See #64393.
 }}}

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


More information about the wp-trac mailing list