Skip to content

Update: Export BUNDLED_PACKAGES from lib/util#76818

Open
csorrentino wants to merge 1 commit intoWordPress:trunkfrom
csorrentino:update/export-bundled-packages-from-util
Open

Update: Export BUNDLED_PACKAGES from lib/util#76818
csorrentino wants to merge 1 commit intoWordPress:trunkfrom
csorrentino:update/export-bundled-packages-from-util

Conversation

@csorrentino
Copy link
Copy Markdown

What?

Exports the existing BUNDLED_PACKAGES constant from lib/util.js.

Why?

BUNDLED_PACKAGES is currently defined but not exported from lib/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_PACKAGES but has since drifted – missing new entries, and carrying entries that were removed in previous versions.

How?

Adds BUNDLED_PACKAGES to module.exports in lib/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, import BUNDLED_PACKAGES from lib/util:

const { BUNDLED_PACKAGES } = require('@wordpress/dependency-extraction-webpack-plugin/lib/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

export BUNDLED_PACKAGES alongside the existing exports so downstream consumers can import it directly and stay in sync automatically without duplicating the list.
@github-actions
Copy link
Copy Markdown

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.

Unlinked Accounts

The 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.

Unlinked contributors: csorrentino.


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

@github-actions
Copy link
Copy Markdown

👋 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.

@github-actions github-actions bot added the First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository label Mar 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant