Only copy .js files for scripts#11315
Conversation
|
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. |
There was a problem hiding this comment.
Pull request overview
This PR adjusts the Gutenberg build integration so that the script-modules copy step only brings over JavaScript files, avoiding copying PHP module metadata files (e.g. individual *.asset*.php) and other non-JS files that are already consolidated into wp-includes/assets/.
Changes:
- Update
copy:gutenberg-modulesinGruntfile.jsto copy only**/*.jsfromgutenberg/build/modules.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
peterwilsoncc
left a comment
There was a problem hiding this comment.
This one not so much
- Merge in trunk for testing purposes.
rm -rf gutenberg .gutenberg-hash; npm ci; npm run grunt clean:qunit; npm run build:dev- Visit font library
wp-admin/font-library.php?p=%2Ffont-list - Observe black screen of death
Environment
- WordPress: 7.0-beta5-61991-src
- PHP: 8.5.3
- Server: nginx/1.24.0
- Database: mysqli (Server: 8.0.44-0ubuntu0.24.04.2 / Client: mysqlnd 8.5.3)
- Browser: Firefox 148.0
- OS: macOS
- Theme: Twenty Twenty-Five 1.4
- MU Plugins:
- cpt-test.php
- _admin_bar_show_cache.php
- _qm-mappings.php
- Plugins:
- Test Reports 1.2.1
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/`.
8816843 to
47a4a9e
Compare
|
@peterwilsoncc thanks! I revised the code to skip the PHP files for the scripts, not the modules. I was crossed up because they are called scripts and script modules, but are different. Also adjusted the PR title and description. The PHP files copied into I'd like to look at adjusting that for 7.1 so that the |
.js files for script modules.js files for scripts
The
*.min.asset.phpfiles in thejs/distdirectory should not be copied in the build step.The contents of these files are already included in the built
wp-includes/assets/script-loader-packages.phpfile.Trac ticket: Core-64393.
Use of AI Tools
AI assistance: Yes
Tool(s): Claude Code
Model(s): Sonnet 4.6
Used for: Used Claude to analyze the code base to confirm that the PHP files being removed had no use within
wordpress-develop.This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.