[wp-trac] [WordPress Trac] #64884: Build: Exclude non-minified VIPS files from grunt module copy
WordPress Trac
noreply at wordpress.org
Wed Mar 18 15:58:42 UTC 2026
#64884: Build: Exclude non-minified VIPS files from grunt module copy
------------------------------+-----------------------
Reporter: adamsilverstein | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 7.0
Component: Build/Test Tools | Version: trunk
Severity: normal | Keywords: has-patch
Focuses: |
------------------------------+-----------------------
## Summary
The `gutenberg-modules` grunt copy task in `Gruntfile.js` copies all
script module files from the Gutenberg build except `.map` files. However,
it does not exclude non-minified VIPS files, which are ~16MB of
base64-encoded inlined WASM data. The non-minified `worker.js` is nearly
identical in size to `worker.min.js` (minification has negligible effect
on base64-encoded binary data) and provides no debugging value.
The existing `tools/gutenberg/copy.js` already has this exclusion (lines
213-220), but the Gruntfile's `copy:gutenberg-modules` task — which
performs the actual module copy during `grunt build:gutenberg` — was
missing the equivalent filter. This results in both `worker.js` (~16MB)
and `worker.min.js` (~16MB) being included in the build output
unnecessarily.
## Steps to Reproduce
1. Run `npx grunt build:gutenberg`
2. Check `build/wp-includes/js/dist/script-modules/vips/`
3. Observe both `worker.js` and `worker.min.js` are present, nearly
identical in size (~16MB each)
## Expected Behavior
Only `worker.min.js` should be present in the build output, since the non-
minified version provides no additional value for WASM-inlined content.
## Proposed Change
Add a glob exclusion `!vips/!(*.min).js` to the `gutenberg-modules` copy
task's `src` array in `Gruntfile.js`, matching the filter already in
`tools/gutenberg/copy.js`.
PR: https://github.com/WordPress/wordpress-develop/pull/11281
Companion Gutenberg PR: https://github.com/WordPress/gutenberg/pull/76615
--
Ticket URL: <https://core.trac.wordpress.org/ticket/64884>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list