From 8472d914a2f9107c08a9a30ab1ea8ed8d10bc43a Mon Sep 17 00:00:00 2001 From: David Festal Date: Wed, 12 Jun 2024 23:58:02 +0200 Subject: [PATCH] fix(cli): fix the removal of type definitions by `export-dynamic`. (#1810) fix(cli): fix the removal of `dist/*.d.ts` files by `export-dynamic`. Signed-off-by: David Festal --- .../commands/export-dynamic-plugin/backend-embed-as-code.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/cli/src/commands/export-dynamic-plugin/backend-embed-as-code.ts b/packages/cli/src/commands/export-dynamic-plugin/backend-embed-as-code.ts index 86c1a2c2bd..241a79c2e9 100644 --- a/packages/cli/src/commands/export-dynamic-plugin/backend-embed-as-code.ts +++ b/packages/cli/src/commands/export-dynamic-plugin/backend-embed-as-code.ts @@ -346,6 +346,9 @@ export async function backend( // Remove the `dist` folder of the original plugin root folder and rebuild it, // since it has been compiled with dynamic-specific settings. await fs.remove(paths.resolveTarget('dist')); + if (roleInfo.output.includes('types')) { + outputs.add(Output.types); + } await buildPackage({ outputs, minify: Boolean(opts.minify),