From 359484d3510087ed05f6fa30e0753f1ad7777d93 Mon Sep 17 00:00:00 2001 From: Rick Dutour Geerling Date: Tue, 4 Jul 2023 20:32:11 +0200 Subject: [PATCH 1/2] docs(recipes/swc): fix import path --- content/recipes/swc.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/recipes/swc.md b/content/recipes/swc.md index 445d5de579..32948072c5 100644 --- a/content/recipes/swc.md +++ b/content/recipes/swc.md @@ -135,7 +135,7 @@ declare a `generate-metadata.ts` file near the `main.ts` file with the following ```ts import { PluginMetadataGenerator } from '@nestjs/cli/lib/compiler/plugins'; -import { ReadonlyVisitor } from '@nestjs/swagger'; +import { ReadonlyVisitor } from '@nestjs/swagger/dist/plugin'; const generator = new PluginMetadataGenerator(); generator.generate({ From 0c62fb95dcf9b9db0c297c362f6a14ddd32f5bcc Mon Sep 17 00:00:00 2001 From: Rick Dutour Geerling Date: Tue, 4 Jul 2023 21:58:36 +0200 Subject: [PATCH 2/2] docs(recipes/swc): use app-specific tsconfig Update example to use app-specific tsconfig. Using the root tsconfig will include `*.dto.ts` (etc) from all apps, whereas they might not all expose HTTP endpoints or publish a swagger doc. --- content/recipes/swc.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/recipes/swc.md b/content/recipes/swc.md index 32948072c5..e8e8e1cda8 100644 --- a/content/recipes/swc.md +++ b/content/recipes/swc.md @@ -142,7 +142,7 @@ generator.generate({ visitors: [new ReadonlyVisitor({ introspectComments: true, pathToSource: __dirname })], outputDir: __dirname, watch: true, - tsconfigPath: 'tsconfig.build.json', + tsconfigPath: 'apps//tsconfig.app.json', }); ```