From 370eac2b25898ec1a6e027e84c1c63f383927069 Mon Sep 17 00:00:00 2001 From: tobias Date: Mon, 20 May 2024 14:06:01 +0200 Subject: [PATCH] Save generated payload types in astro types folder --- astro/.gitignore | 2 +- astro/src/utils/payload.ts | 2 +- payload/src/payload.config.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/astro/.gitignore b/astro/.gitignore index 67a0c3b..a1e45f1 100644 --- a/astro/.gitignore +++ b/astro/.gitignore @@ -18,4 +18,4 @@ pnpm-debug.log* .DS_Store # types -src/types.ts \ No newline at end of file +src/types/payload-types.ts \ No newline at end of file diff --git a/astro/src/utils/payload.ts b/astro/src/utils/payload.ts index c5b4fe5..7275281 100644 --- a/astro/src/utils/payload.ts +++ b/astro/src/utils/payload.ts @@ -1,4 +1,4 @@ -import type { Post } from "@/types"; +import type { Post } from "@/types/payload-types"; const url = import.meta.env.DEV ? "http://payload:3001" diff --git a/payload/src/payload.config.ts b/payload/src/payload.config.ts index 92cb7da..8c57fd3 100644 --- a/payload/src/payload.config.ts +++ b/payload/src/payload.config.ts @@ -22,6 +22,6 @@ export default buildConfig({ }, collections: [Posts, Users, Authors, Media], typescript: { - outputFile: path.resolve("/", "types.ts"), + outputFile: path.resolve("../astro/src/types/", "payload-types.ts"), }, });