## Unreleased ### New Features - Add a `--no-script-debug` flag that skips generating the unminified debug assets, for plugins that would rather not ship them. The generated registration code loads the minified files even when `SCRIPT_DEBUG` is enabled if the build has no unminified files ([#75396](https://github.com/WordPress/gutenberg/pull/75396)). ### Bug Fixes - Keep `translators:` comments next to their `__()`, `_x()`, `_n()` and `_nx()` calls in the transpiled and unminified output, so `wp i18n make-pot` extracts them from the built files ([#87189](https://github.com/WordPress/gutenberg/pull/87189)). ### Internal - The generated registration PHP now picks the `SCRIPT_DEBUG` file extension with an `if` that also checks the new `has_debug_assets` key of `build/constants.php`, in every build. Tools that post-process the generated PHP may need updating; read `has_debug_assets` instead of matching the template code ([#75396](https://github.com/WordPress/gutenberg/pull/75396)). - Update `@types/node` development dependency to 24.19.2 ([#87251](https://github.com/WordPress/gutenberg/pull/87251)). - Update `vitest` development dependency to 5.1.1 ([#87254](https://github.com/WordPress/gutenberg/pull/87254)). ## 0.28.0 (2026-11-18) ### Enhancements - In watch mode, copy a changed PHP file from `wpCopyFiles` to the build on its own instead of rebuilding its whole package, so the change reaches the build in milliseconds rather than seconds. Adding or removing a PHP file still rebuilds the package ([#86271](https://github.com/WordPress/gutenberg/pull/86271)). ### Bug Fixes - Exit the generated PHP files when they are accessed directly, print the inline styles and scripts of generated pages through the WordPress enqueue functions, and escape the message shown when a user cannot access a page. Plugins shipping the build now pass the WordPress.org Plugin Directory review and Plugin Check ([#86699](https://github.com/WordPress/gutenberg/pull/86699)). - Require PostCSS `^8.5.33` for CSS parser fixes and source-map file-loading protections ([#86899](https://github.com/WordPress/gutenberg/pull/86899)). - Let a full-page screen show the admin bar again. The page template's rule that hides it now loads after the page's own styles, so it has zero specificity to keep it overridable ([#86992](https://github.com/WordPress/gutenberg/pull/86992)). - Load a `wp-admin` page's scripts and styles only on its own screen, not on a Core screen whose screen ID matches the page slug. The `dashboard` page no longer hides the content of the Core Dashboard (`index.php`) ([#86995](https://github.com/WordPress/gutenberg/pull/86995)). ### Internal - Widen the `@wordpress/theme` peer dependency range to include 5.x ([#86720](https://github.com/WordPress/gutenberg/pull/86720)). - Update the Vitest development dependency to 5.1.0 ([#86509](https://github.com/WordPress/gutenberg/pull/86509)). ## 0.27.0 (2026-11-04) ### Enhancements - Copy `example` from `widget.json` into `build/widgets/registry.php`, next to `attributes`, so a widget's example attributes reach the server registry without a metadata module ([#85240](https://github.com/WordPress/gutenberg/pull/85240)). - Limit concurrent `esbuild` build jobs to half of the available CPU parallelism ([#79889](https://github.com/WordPress/gutenberg/pull/79889)). ### Bug Fixes - Derive CSS module class names from the stylesheet's CSS as well as its path, so two builds of a package share class names only where their CSS is identical. This stops an older bundled copy of a package from styling a newer copy's elements. All CSS module class names change once with this release ([#85900](https://github.com/WordPress/gutenberg/pull/85900)). ### Internal - Pass `false` instead of an empty string as `$src` in `wp_register_script()` in page templates ([#86106](https://github.com/WordPress/gutenberg/pull/86106)). - Update the Vitest development dependency to 5.0.5 ([#86173](https://github.com/WordPress/gutenberg/pull/86173)). - Bundle and transpile with Rolldown instead of esbuild ([#85476](https://github.com/WordPress/gutenberg/pull/85476)). - Load design token fallback plugins from the new `@wordpress/theme-build-tools` dependency instead of the `@wordpress/theme` entry points ([#83568](https://github.com/WordPress/gutenberg/pull/83568)). - Declare `@wordpress/theme` as an optional peer dependency again, so the fallback plugins use the version the consumer installs ([#85388](https://github.com/WordPress/gutenberg/pull/85388)). - Point the page templates' preload comments at the TypeScript `entities.ts` in `@wordpress/core-data` ([#85070](https://github.com/WordPress/gutenberg/pull/85070)). - Note beside `applyTemplateReplacements()` that Gutenberg's PHPStan analysis of the PHP templates keeps a sample value for each placeholder, which must be updated along with it ([#66693](https://github.com/WordPress/gutenberg/pull/66693)). ## 0.26.0 (2026-10-20) ### Breaking Changes - Remove the automatic Babel processing for `packages/components`, including the Emotion transform, implicit project Babel configuration support, and build-time dependencies. Projects that rely on these transforms must run Babel separately before `@wordpress/build` ([#84707](https://github.com/WordPress/gutenberg/pull/84707)). - Raise the minimum required Node.js version to `>=22.13.0`, for stable `require(esm)` support ([#84313](https://github.com/WordPress/gutenberg/pull/84313)). ### New Features - Support importing `.svg` files from JavaScript. The SVG is inlined into the bundle (and into transpiled packages) and the import resolves to a `data:` URI ([#85147](https://github.com/WordPress/gutenberg/pull/85147)). - Add a `{prefix}_{page_slug}_wp_admin_preload_paths` filter to the generated wp-admin page template, so a page can preload the REST API requests its JavaScript issues on mount ([#77353](https://github.com/WordPress/gutenberg/pull/77353)). ### Enhancements - Expose a script's exports on its global as read-only data properties, holding the same values, instead of esbuild's getters, which forwarded to the getters of the module's own exports. Every use of a script's export by another script went through them, which was costly while the page loads ([#85180](https://github.com/WordPress/gutenberg/pull/85180)). - Resolve development bundles with the `development` and `module` export conditions, enabling runtime diagnostics such as unsupported Emotion component selectors ([#84707](https://github.com/WordPress/gutenberg/pull/84707)). ### Bug Fixes - Check that `SCRIPT_DEBUG` is defined before reading it in the generated `build/scripts.php` and `build/styles.php`, like the other generated files, so they no longer throw an `Error` when loaded without WordPress defining the constant ([#83633](https://github.com/WordPress/gutenberg/pull/83633)). - Add `generate_animated_image_subsizes` to the page template `/?_fields=` preload path, keeping it in sync with the `_fields` list in `@wordpress/core-data` ([#80385](https://github.com/WordPress/gutenberg/pull/80385)). ### Internal - Publish only runtime files, dropping `tsconfig.json`, the TypeScript build cache (`.cache`) and the test files from the package ([#84164](https://github.com/WordPress/gutenberg/pull/84164)). ## 0.25.0 (2026-10-07) ### Bug Fixes - Add the `@babel/core` dependency, a peer of `esbuild-plugin-babel` ([#83765](https://github.com/WordPress/gutenberg/pull/83765)). - Keep the build machine's absolute paths out of worker source maps when `wpWorkers` redirects a module with `resolve`, so the output is reproducible across checkouts ([#84163](https://github.com/WordPress/gutenberg/pull/84163)). ### Internal - Drop the optional `@wordpress/boot`, `@wordpress/private-apis`, and `@wordpress/route` peer dependencies, unused since they are no longer bundled ([#83601](https://github.com/WordPress/gutenberg/pull/83601)). ## 0.24.0 (2026-09-23) ### Enhancements - Carry a widget's `attributes` from `widget.json` into `build/widgets/registry.php` ([#82485](https://github.com/WordPress/gutenberg/pull/82485)). - Build `.cjs`, `.mts` and `.cts` source files, including route and widget entry points, and rewrite their local imports to the emitted `.mjs` or `.cjs` extension ([#83071](https://github.com/WordPress/gutenberg/pull/83071)). - Import route stage, inspector and canvas files by their full file name, so a route entry no longer depends on esbuild extending an extensionless path ([#83071](https://github.com/WordPress/gutenberg/pull/83071)). ### Internal - Declare `@wordpress/theme` as a dev dependency, so the types of the optional peer dependency resolve when dependencies are isolated ([#83129](https://github.com/WordPress/gutenberg/pull/83129)). ## 0.23.0 (2026-09-10) ### Breaking Changes - `@wordpress/build` no longer parses JSX syntax in `.js` source files. Rename these files to `.jsx` or `.tsx` before building ([#82189](https://github.com/WordPress/gutenberg/pull/82189)). ### Enhancements - Target `@wordpress/browserslist-config` for JavaScript and CSS when the project has no Browserslist config, instead of Browserslist's implicit defaults ([#82179](https://github.com/WordPress/gutenberg/pull/82179)). - Transpile `.jsx` package, route, and widget source files alongside the existing JavaScript and TypeScript extensions, and ignore JSX tests during watch rebuilds ([#80990](https://github.com/WordPress/gutenberg/pull/80990)). ### Bug Fixes - Fix generated regular CSS injection in Browser Mode while retaining the existing Node and jsdom test behavior ([#82154](https://github.com/WordPress/gutenberg/pull/82154)). - Pages: require authentication and a configurable capability (new `capability` page setting, default `manage_options`) before rendering generated standalone pages, so `admin_init` entry points such as `admin-post.php` no longer serve them to logged-out visitors ([#82254](https://github.com/WordPress/gutenberg/pull/82254)). - Widen the optional `@wordpress/theme` peer dependency range to allow 2.x releases. ([#82139](https://github.com/WordPress/gutenberg/pull/82139)) - Pages: preserve the Core Boot layout compatibility class in generated wp-admin page templates so short pages fill the viewport when using Core's bundled Boot module ([#82112](https://github.com/WordPress/gutenberg/pull/82112)). ### Internal - Update the `@types/node` development dependency to v24, matching the Node.js version the repository builds and tests against ([#82616](https://github.com/WordPress/gutenberg/pull/82616)). ## 0.22.0 (2026-08-26) ### Internal - Identify generated wp-admin page mount elements by their page-specific ID instead of a Boot class ([#81756](https://github.com/WordPress/gutenberg/pull/81756)). ### Bug Fixes - Register the content module for routes that only export a `canvas`, so a route without a stage or inspector can render a custom canvas ([#81578](https://github.com/WordPress/gutenberg/pull/81578)). - Pages: use the boot module that ships with Core when the plugin has no local one, so plugin pages are no longer empty ([#81761](https://github.com/WordPress/gutenberg/pull/81761)). ### Documentation - Widget attributes: the `relevance` hint documents the `'medium'` tier ([#81556](https://github.com/WordPress/gutenberg/pull/81556)). ## 0.21.0 (2026-08-12) ### Enhancements - Widgets: carry an action's `icon` and `relevance` from `widget.json` into the generated PHP registry ([#81275](https://github.com/WordPress/gutenberg/pull/81275)). - Widgets: carry a widget's declarative `icon` reference from `widget.json` into the generated PHP registry ([#80969](https://github.com/WordPress/gutenberg/pull/80969)). - Render a no-JavaScript heading and notice from the generated page templates ([#81365](https://github.com/WordPress/gutenberg/pull/81365)). ### Bug Fixes - Scope the generated page template's critical styles to `body.js` so the no-JS notice stays visible ([#80628](https://github.com/WordPress/gutenberg/pull/80628)). - Wrap script bundles in an IIFE to avoid `use strict` affecting external code in concatenated JavaScript files ([#79792](https://github.com/WordPress/gutenberg/pull/79792). ### Internal - Remove obsolete dependency grouping comments as part of the repository-wide separator-free import migration. ([#81248](https://github.com/WordPress/gutenberg/pull/81248)) ## 0.20.0 (2026-07-29) ### Enhancements - Widgets: carry a widget's declarative `actions` from `widget.json` into the generated PHP registry ([#80363](https://github.com/WordPress/gutenberg/pull/80363)). ### Bug Fixes - Ignore generated `src/worker-code.ts` in watch mode to stop rebuild loops for worker packages like `@wordpress/vips` ([#80361](https://github.com/WordPress/gutenberg/pull/80361)). - Pass the current `$hook_suffix` to the `admin_footer` action in the generated single-page admin template instead of an empty string ([#75985](https://github.com/WordPress/gutenberg/pull/75985)). - Sync the page template `/?_fields=` preload path with the `_fields` list in `@wordpress/core-data` so the preload is consumed instead of the page issuing a duplicate request ([#80648](https://github.com/WordPress/gutenberg/pull/80648)). ## 0.19.0 (2026-07-14) ### Enhancements - Align the generated single-page admin font-family stack with the `@wordpress/theme` body token ([#80093](https://github.com/WordPress/gutenberg/pull/80093)). - Widgets: carry the optional metadata fields from `widget.json` into the generated PHP registry: `title`, `description`, `category`, `keywords`, `textdomain`, and the `help` note, so hosts can translate the user-facing fields server-side ([#79638](https://github.com/WordPress/gutenberg/pull/79638), [#79701](https://github.com/WordPress/gutenberg/pull/79701), [#79830](https://github.com/WordPress/gutenberg/pull/79830)). ### Bug Fixes - Widen the optional `@wordpress/theme` peer dependency range to allow 1.x releases and preserve automatic design token fallback plugin loading ([#80089](https://github.com/WordPress/gutenberg/pull/80089)). ## 0.18.0 (2026-07-01) ## 0.17.0 (2026-06-24) ### Documentation - Fix `genereated` typo to `generated` in README. ([#79331](https://github.com/WordPress/gutenberg/pull/79331)) ## 0.16.1 (2026-06-16) ## 0.16.0 (2026-06-10) ### Bug Fixes - Stop the build from crashing when a namespaced import resolves to a package that is not an installed dependency. `getPackageInfo` now returns `null` (honoring its documented contract) instead of throwing, letting the externals plugin fall through to esbuild's own resolution ([#78715](https://github.com/WordPress/gutenberg/pull/78715)). - Remove the incorrect `#wpwrap` background from wp-admin critical CSS to prevent a black flash before hydration; rely on the existing `body` background instead ([#78493](https://github.com/WordPress/gutenberg/pull/78493)). - Revert the getter-based export replacement in `@wordpress/build` to restore compatibility for affected Gutenberg 23.0 builds ([#78917](https://github.com/WordPress/gutenberg/pull/78917)). ## 0.15.0 (2026-05-27) ### Bug Fixes - Defer single-page admin `import( "@wordpress/boot" )` until `DOMContentLoaded` so the boot module evaluates after classic script dependencies have loaded ([#78136](https://github.com/WordPress/gutenberg/pull/78136)). ## 0.14.0 (2026-05-14) ### Enhancements - Replace getter-based `wp.*` exports with data properties for faster property access ([#78303](https://github.com/WordPress/gutenberg/pull/78303)). ### Bug Fixes - Register generated CSS module styles with `@wordpress/style-runtime` so they can be injected into registered documents, such as editor iframes ([#77965](https://github.com/WordPress/gutenberg/pull/77965)). - Guard `require_once` calls in generated PHP files against deployment race conditions ([#78110](https://github.com/WordPress/gutenberg/pull/78110)). ## 0.13.0 (2026-04-29) ### Bug Fixes - Update the optional `@wordpress/boot`, `@wordpress/route`, and `@wordpress/theme` peer dependency ranges to avoid blocking newer compatible package versions ([#77568](https://github.com/WordPress/gutenberg/pull/77568)). ## 0.12.0 (2026-04-15) ## 0.11.0 (2026-04-01) ### Bug Fixes - Derive `data-wp-hash` from the transformed CSS instead of the raw source to prevent style mismatches when multiple build pipelines process the same source file ([#76743](https://github.com/WordPress/gutenberg/pull/76743)). ## 0.10.0 (2026-03-18) ### Breaking Changes - `@wordpress/boot`, `@wordpress/route`, `@wordpress/theme`, and `@wordpress/private-apis` are no longer bundled. They are now expected to be provided by WordPress Core (7.0+) or the Gutenberg plugin. ### Enhancements - Avoid unexpected results when typecasting `IS_GUTENBERG_PLUGIN` and `IS_WORDPRESS_CORE` values to Booleans ([#75844](https://github.com/WordPress/gutenberg/pull/75844)). - Skip PHP transforms during builds when building for WordPress Core ([#75844](https://github.com/WordPress/gutenberg/pull/75844)). ## 0.9.0 (2026-03-04) ## 0.8.0 (2026-02-18) ## 0.7.0 (2026-01-29) - Update documentation to describe `wpPlugin.name` - Add `wpWorkers` field support for automatic worker bundling ([#74785](https://github.com/WordPress/gutenberg/pull/74785)). - Add WASM inlining plugin for bundling WebAssembly modules. ## 0.6.0 (2026-01-16) ### Breaking Changes - Renamed generated PHP files to avoid `index.php` naming conflicts: - `build/index.php` → `build/build.php` - `build/modules/index.php` → `build/modules/registry.php` - `build/scripts/index.php` → `build/scripts/registry.php` - `build/styles/index.php` → `build/styles/registry.php` - `build/routes/index.php` → `build/routes/registry.php` - All generated page functions now include the `{{PREFIX}}` (from `wpPlugin.name`) at the beginning: - `register_my_page_route()` → `my_plugin_register_my_page_route()` - `my_page_render_page()` → `my_plugin_my_page_render_page()` - And similarly for all other page functions - Route registration now uses named functions instead of anonymous closures, allowing third-party developers to unhook them ## 0.4.0 (2025-11-26) ## 0.3.0 (2025-11-12) ## 0.2.0 (2025-10-29) ### New Features - Initial release of `@wordpress/build` package - Transpilation support for TypeScript/JSX to CommonJS and ESM formats - SCSS and CSS modules compilation with LTR and RTL support - WordPress script and module bundling - Automatic PHP registration file generation - Watch mode for development