From 4eba1e3f4f725abbb5ec310a635cb75e2b6993d6 Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers <359867+desrosj@users.noreply.github.com> Date: Tue, 24 Feb 2026 20:52:55 -0500 Subject: [PATCH 1/5] Remove `clean:interactivity-assets`. These assets are now managed as a script module instead. --- Gruntfile.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 81da2faae228f..e55b81f7ece5b 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -233,10 +233,6 @@ module.exports = function(grunt) { 'webpack-assets': webpackFiles.map( function( file ) { return setFilePath( WORKING_DIR, file ); } ), - 'interactivity-assets': [ - WORKING_DIR + 'wp-includes/js/dist/interactivity.asset.php', - WORKING_DIR + 'wp-includes/js/dist/interactivity.min.asset.php', - ], dynamic: { dot: true, expand: true, @@ -1708,7 +1704,6 @@ module.exports = function(grunt) { 'clean:webpack-assets', 'webpack:prod', 'webpack:dev', - 'clean:interactivity-assets', ] ); grunt.registerTask( 'build:js', [ From bc9b9853363f8dd5b0d03e0c3e7d4cae5c30c0d5 Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers <359867+desrosj@users.noreply.github.com> Date: Tue, 24 Feb 2026 20:59:07 -0500 Subject: [PATCH 2/5] Block JS files are now not in `wp-includes/blocks` --- Gruntfile.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index e55b81f7ece5b..c3c274241b911 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -45,8 +45,6 @@ module.exports = function(grunt) { jsFiles = [ 'wp-admin/js/', 'wp-includes/js/', - 'wp-includes/blocks/**/*.js', - 'wp-includes/blocks/**/*.js.map', ], // All files built by Webpack, in /src or /build. From 65bdb6097d39846adb25e85524674d9cc5f5df47 Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers <359867+desrosj@users.noreply.github.com> Date: Tue, 24 Feb 2026 20:59:26 -0500 Subject: [PATCH 3/5] Update the list of files built by Webpack. --- Gruntfile.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index c3c274241b911..729bc3faf06b9 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -48,12 +48,12 @@ module.exports = function(grunt) { ], // All files built by Webpack, in /src or /build. + // Webpack now only builds Core-specific media files and development scripts. + // Blocks, packages, script modules, and vendors come from the Gutenberg build. webpackFiles = [ - 'wp-includes/assets/*', - 'wp-includes/css/dist', - 'wp-includes/blocks/**/*.css', - '!wp-includes/assets/script-loader-packages.min.php', - '!wp-includes/assets/script-modules-packages.min.php', + 'wp-includes/js/media-*.js', + 'wp-includes/js/media-*.min.js', + 'wp-includes/js/dist/development', ], // All workflow files that should be deleted from non-default branches. @@ -228,6 +228,8 @@ module.exports = function(grunt) { js: jsFiles.map( function( file ) { return setFilePath( WORKING_DIR, file ); } ), + + // Clean files built by Webpack. 'webpack-assets': webpackFiles.map( function( file ) { return setFilePath( WORKING_DIR, file ); } ), From 91a598db8e6561ef6e47ef6f5833fea92ec65b93 Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers <359867+desrosj@users.noreply.github.com> Date: Tue, 24 Feb 2026 21:00:21 -0500 Subject: [PATCH 4/5] Add a list of files copied by `tools/gutenberg/*` --- Gruntfile.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Gruntfile.js b/Gruntfile.js index 729bc3faf06b9..9ce2743cf3222 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -47,6 +47,19 @@ module.exports = function(grunt) { 'wp-includes/js/', ], + // All files copied from the Gutenberg repository. + gutenbergFiles = [ + 'wp-includes/assets', + 'wp-includes/build', + // This is redundant given the next line, but included for clarity. + 'wp-includes/script-modules', + 'wp-includes/js/dist', + 'wp-includes/css/dist', + 'wp-includes/blocks', + '!wp-includes/blocks/index.php', + 'wp-includes/icons', + ], + // All files built by Webpack, in /src or /build. // Webpack now only builds Core-specific media files and development scripts. // Blocks, packages, script modules, and vendors come from the Gutenberg build. @@ -233,6 +246,11 @@ module.exports = function(grunt) { 'webpack-assets': webpackFiles.map( function( file ) { return setFilePath( WORKING_DIR, file ); } ), + + // Clean files built by the tools/gutenberg scripts. + gutenberg: gutenbergFiles.map( function( file ) { + return setFilePath( WORKING_DIR, file ); + }), dynamic: { dot: true, expand: true, From 14b393d66e686e77fec79a956d2cb241b32308de Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers <359867+desrosj@users.noreply.github.com> Date: Tue, 24 Feb 2026 21:24:15 -0500 Subject: [PATCH 5/5] Use the correct globbing pattern to allow negation --- Gruntfile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gruntfile.js b/Gruntfile.js index 9ce2743cf3222..84343d7c7331b 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -55,7 +55,7 @@ module.exports = function(grunt) { 'wp-includes/script-modules', 'wp-includes/js/dist', 'wp-includes/css/dist', - 'wp-includes/blocks', + 'wp-includes/blocks/**/*', '!wp-includes/blocks/index.php', 'wp-includes/icons', ],