From 07d1c85ebe02ed6742393e46947d3d7a9a25447b Mon Sep 17 00:00:00 2001 From: Manzoor Wani Date: Fri, 18 Sep 2026 17:45:36 +0530 Subject: [PATCH 1/2] Build: Declare @wordpress/theme as a dev dependency of @wordpress/build The dynamic import of @wordpress/theme/postcss-plugins/postcss-ds-token-fallbacks in compile-inline-style.mjs is an optional peer, so its types are not resolvable under isolated and strict peer dependencies. Reference the theme plugin project so the declarations exist before wp-build is checked. --- package-lock.json | 1 + packages/wp-build/package.json | 1 + packages/wp-build/tsconfig.json | 5 ++++- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/package-lock.json b/package-lock.json index 118d8564266d9b..c5b07e036c7919 100644 --- a/package-lock.json +++ b/package-lock.json @@ -47318,6 +47318,7 @@ }, "devDependencies": { "@types/node": "^24.13.3", + "@wordpress/theme": "file:../theme", "vitest": "^5.0.0" }, "engines": { diff --git a/packages/wp-build/package.json b/packages/wp-build/package.json index 32937c97f8f5e5..2c78f2e0eccf04 100644 --- a/packages/wp-build/package.json +++ b/packages/wp-build/package.json @@ -56,6 +56,7 @@ }, "devDependencies": { "@types/node": "^24.13.3", + "@wordpress/theme": "file:../theme", "vitest": "^5.0.0" }, "peerDependencies": { diff --git a/packages/wp-build/tsconfig.json b/packages/wp-build/tsconfig.json index e5d63745974613..0d9be329bf282b 100644 --- a/packages/wp-build/tsconfig.json +++ b/packages/wp-build/tsconfig.json @@ -17,7 +17,10 @@ "noEmit": true, "outDir": ".cache" }, - "references": [ { "path": "../style-runtime/tsconfig.build.json" } ], + "references": [ + { "path": "../style-runtime/tsconfig.build.json" }, + { "path": "../theme/tsconfig.plugins.json" } + ], "include": [ "." ], "exclude": [ // Excluded to maintain consistency with bin/tsconfig.json From d8054c900e4823b63d9e30b25488273b114398ab Mon Sep 17 00:00:00 2001 From: Manzoor Wani Date: Fri, 18 Sep 2026 17:46:19 +0530 Subject: [PATCH 2/2] Build: Add changelog entry --- packages/wp-build/CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/wp-build/CHANGELOG.md b/packages/wp-build/CHANGELOG.md index 536424a3c4b1df..98d8a51d75415b 100644 --- a/packages/wp-build/CHANGELOG.md +++ b/packages/wp-build/CHANGELOG.md @@ -8,6 +8,10 @@ - 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