Skip to content

Consolidate copy logic and ensure .min files are properly minified#11418

Open
desrosj wants to merge 2 commits intoWordPress:trunkfrom
desrosj:combine-vendor-copy
Open

Consolidate copy logic and ensure .min files are properly minified#11418
desrosj wants to merge 2 commits intoWordPress:trunkfrom
desrosj:combine-vendor-copy

Conversation

@desrosj
Copy link
Copy Markdown
Member

@desrosj desrosj commented Apr 1, 2026

The tools/vendor/copy-vendors.js file was added in r61438 to copy files from the node_modules directory the appropriate location in built WordPress. This was previously handled by Webpack, but the majority of the Webpack code was also removed as part of that change.

In Grunt, there is a grunt copy task that is used to handle copying of files, and there is even a copy:vendor-js subtask. This moves all of the vendor file paths into this task to keep all vendor copying logic in one place.

Trac ticket: Core-65007. See also: Core-64393.

Use of AI Tools

AI assistance: Yes
Tool(s): Claude
Model(s): Sonnet 4.6
Used for: Created the initial first draft of the PR.


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.

@desrosj desrosj self-assigned this Apr 1, 2026
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 1, 2026

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 props-bot label.

Core Committers: Use this line as a base for the props when committing in SVN:

Props desrosj.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

This removes the need for a separate script for copying vendor files in favor of using `grunt copy`, which already handles some vendor files.
@desrosj desrosj force-pushed the combine-vendor-copy branch from 973733e to 0c092b5 Compare April 1, 2026 02:36
@desrosj desrosj requested a review from peterwilsoncc April 1, 2026 02:38
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 1, 2026

Test using WordPress Playground

The 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

  • All changes will be lost when closing a tab with a Playground instance.
  • All changes will be lost when refreshing the page.
  • A fresh instance is created each time the link below is clicked.
  • Every time this pull request is updated, a new ZIP file containing all changes is created. If changes are not reflected in the Playground instance,
    it's possible that the most recent build failed, or has not completed. Check the list of workflow runs to be sure.

For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation.

Test this pull request with WordPress Playground.

@desrosj desrosj changed the title Remove custom script for copying vendor files Consolidate copy logic and ensure .min files are properly minified Apr 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant