From 30f2431261788e3696d502eb4f046c033562b620 Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers <359867+desrosj@users.noreply.github.com> Date: Thu, 19 Mar 2026 22:43:03 -0400 Subject: [PATCH 1/3] Only copy `.js` files for script modules. The `*.asset.min.php` files and `router.php` in the main script modules directory should not be copied in the build step. The contents of these files are already included in the built file within `wp-includes/assets/`. --- Gruntfile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gruntfile.js b/Gruntfile.js index 4aded0a659c00..60ce152eda11e 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -641,7 +641,7 @@ module.exports = function(grunt) { expand: true, cwd: 'gutenberg/build/modules', src: [ - '**/*', + '**/*.js', '!**/*.map', // Skip non-minified VIPS files — they are ~16MB of inlined WASM // with no debugging value over the minified versions. From 9429b2f0197948a15424db0bcb63228e7981b1a6 Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers <359867+desrosj@users.noreply.github.com> Date: Thu, 19 Mar 2026 22:58:10 -0400 Subject: [PATCH 2/3] Remove unnecessary exclusion pattern. --- Gruntfile.js | 1 - 1 file changed, 1 deletion(-) diff --git a/Gruntfile.js b/Gruntfile.js index 60ce152eda11e..aaa2a867e2412 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -642,7 +642,6 @@ module.exports = function(grunt) { cwd: 'gutenberg/build/modules', src: [ '**/*.js', - '!**/*.map', // Skip non-minified VIPS files — they are ~16MB of inlined WASM // with no debugging value over the minified versions. '!vips/!(*.min).js', From 47a4a9e8c5a183d9b955fd999be22db2b255a1ff Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers <359867+desrosj@users.noreply.github.com> Date: Fri, 20 Mar 2026 08:37:29 -0400 Subject: [PATCH 3/3] Re-add module PHP files, reomve scripts. --- Gruntfile.js | 3 ++- tools/gutenberg/copy.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index aaa2a867e2412..4aded0a659c00 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -641,7 +641,8 @@ module.exports = function(grunt) { expand: true, cwd: 'gutenberg/build/modules', src: [ - '**/*.js', + '**/*', + '!**/*.map', // Skip non-minified VIPS files — they are ~16MB of inlined WASM // with no debugging value over the minified versions. '!vips/!(*.min).js', diff --git a/tools/gutenberg/copy.js b/tools/gutenberg/copy.js index 9eb0550ad18c2..0f197169f7366 100644 --- a/tools/gutenberg/copy.js +++ b/tools/gutenberg/copy.js @@ -595,7 +595,7 @@ async function main() { for ( const file of packageFiles ) { if ( - /^index\.(js|min\.js|min\.asset\.php)$/.test( file ) + /^index\.(js|min\.js)$/.test( file ) ) { const srcFile = path.join( src, file ); // Replace 'index.' with 'package-name.'.