2023-05-13 14:38:56 +00:00
|
|
|
import { buildConfig } from "payload/config";
|
|
|
|
import path from "path";
|
2023-06-17 10:25:57 +00:00
|
|
|
import Posts from "@/collections/Posts";
|
|
|
|
import Users from "@/collections/Users";
|
|
|
|
import Media from "@/collections/Media";
|
2023-05-13 14:38:56 +00:00
|
|
|
|
|
|
|
export default buildConfig({
|
2023-06-07 08:53:39 +00:00
|
|
|
serverURL: process.env.PAYLOAD_URL,
|
2023-05-13 14:38:56 +00:00
|
|
|
admin: {
|
|
|
|
user: Users.slug,
|
2023-06-17 10:25:57 +00:00
|
|
|
webpack: (config) => ({
|
|
|
|
...config,
|
|
|
|
resolve: {
|
|
|
|
...config.resolve,
|
|
|
|
alias: {
|
|
|
|
...config.resolve.alias,
|
|
|
|
"@": path.resolve(__dirname, "./"),
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}),
|
2023-05-13 14:38:56 +00:00
|
|
|
},
|
2023-05-15 14:52:29 +00:00
|
|
|
collections: [Posts, Users, Media],
|
2023-05-13 14:38:56 +00:00
|
|
|
typescript: {
|
2023-05-13 17:10:37 +00:00
|
|
|
outputFile: path.resolve("/", "types.ts"),
|
2023-05-13 14:38:56 +00:00
|
|
|
},
|
|
|
|
});
|