Update: Export BUNDLED_PACKAGES from lib/util#76818
Update: Export BUNDLED_PACKAGES from lib/util#76818csorrentino wants to merge 1 commit intoWordPress:trunkfrom
Conversation
export BUNDLED_PACKAGES alongside the existing exports so downstream consumers can import it directly and stay in sync automatically without duplicating the list.
|
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 Unlinked AccountsThe following contributors have not linked their GitHub and WordPress.org accounts: @csorrentino. Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases. If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @csorrentino! In case you missed it, we'd love to have you join us in our Slack community. If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information. |
What?
Exports the existing
BUNDLED_PACKAGESconstant fromlib/util.js.Why?
BUNDLED_PACKAGESis currently defined but not exported fromlib/util. Downstream tools that depend on this package need to know which@wordpress/*packages are bundled and should not be treated as externals or rewritten to globals. Without access to this list, they are forced to maintain their own hardcoded copy that inevitably drifts as packages are added or removed.For example, @roots/vite-plugin maintains a separate exemptPackages list that was originally derived from
BUNDLED_PACKAGESbut has since drifted – missing new entries, and carrying entries that were removed in previous versions.How?
Adds
BUNDLED_PACKAGEStomodule.exportsinlib/util.js. No logic changes — the constant already exists, this only makes it accessible to consumers.Testing Instructions
In a project that depends on
@wordpress/dependency-extraction-webpack-plugin, importBUNDLED_PACKAGESfromlib/util:Verify the array is defined and contains the expected package names.
Testing Instructions for Keyboard
N/A — no UI changes.
Screenshots or screencast
N/A — no UI changes.
Use of AI Tools
AI was used to make clarifying edits to this PR description