Build: Exclude non-minified VIPS files from grunt module copy#11281
Build: Exclude non-minified VIPS files from grunt module copy#11281adamsilverstein wants to merge 2 commits intoWordPress:trunkfrom
Conversation
The gutenberg-modules grunt copy task copies all files except .map files. This adds an exclusion for non-minified VIPS files which are ~16MB of inlined WASM with no debugging value over the minified versions. This matches the existing filter in tools/gutenberg/copy.js and prevents the ~16MB worker.js from being copied alongside the identically-sized worker.min.js. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
adamziel
left a comment
There was a problem hiding this comment.
Lovely, thank you @adamsilverstein !
|
Thanks @adamsilverstein! One note, these files will not explicitly be removed from the build server until Core-64716 is addressed. The files are not cleaned up on the build server before rerunning I am hoping to refresh #11036 shortly to have it in ahead of RC1. |
Summary
Adds exclusion for non-minified VIPS files in the
gutenberg-modulesgrunt copy task.Why
The VIPS worker files are ~16 MB of inlined WASM data where minification has negligible effect —
worker.jsandworker.min.jsare nearly identical in size. This filter was already present intools/gutenberg/copy.js(lines 213-220) but was missing from the Gruntfile grunt copy task that performs the actual module copy duringgrunt build:gutenberg.Size impact
wp-includes/js/dist/script-modules/vips/Related PRs for further size reduction (in Gutenberg)
Test plan
npx grunt build:gutenberg— verifybuild/wp-includes/js/dist/script-modules/vips/containsworker.min.jsbut NOTworker.jsvendor/bin/phpunit tests/phpunit/tests/script-modules/wpScriptModules.phpTrac ticket: https://core.trac.wordpress.org/ticket/64884
Commit message