Compare commits

2 Commits

Author SHA1 Message Date
f94bc5d822 Move payload types so dev container doesn't crash
All checks were successful
continuous-integration/drone/push Build is passing
2024-05-20 14:20:26 +02:00
370eac2b25 Save generated payload types in astro types folder
All checks were successful
continuous-integration/drone/push Build is passing
2024-05-20 14:06:01 +02:00
5 changed files with 7 additions and 7 deletions

2
.gitignore vendored
View File

@ -2,3 +2,5 @@
data data
yarn-debug.log* yarn-debug.log*
yarn-error.log* yarn-error.log*
/types/payload-types.ts

5
astro/.gitignore vendored
View File

@ -15,7 +15,4 @@ pnpm-debug.log*
# macOS-specific files # macOS-specific files
.DS_Store .DS_Store
# types
src/types.ts

View File

@ -1,4 +1,4 @@
import type { Post } from "@/types"; import type { Post } from "@/types/payload-types";
const url = import.meta.env.DEV const url = import.meta.env.DEV
? "http://payload:3001" ? "http://payload:3001"

View File

@ -4,7 +4,8 @@
"types": ["@astrojs/image/client"], "types": ["@astrojs/image/client"],
"baseUrl": ".", "baseUrl": ".",
"paths": { "paths": {
"@/*": ["src/*"] "@/*": ["src/*"],
"@/types/*": ["../types/*"]
} }
} }
} }

View File

@ -22,6 +22,6 @@ export default buildConfig({
}, },
collections: [Posts, Users, Authors, Media], collections: [Posts, Users, Authors, Media],
typescript: { typescript: {
outputFile: path.resolve("/", "types.ts"), outputFile: path.resolve("../types/", "payload-types.ts"),
}, },
}); });