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";
|
2024-04-03 10:18:03 +00:00
|
|
|
import Couriers from "./collections/Couriers";
|
|
|
|
import Dispatches from "./collections/Dispatches";
|
|
|
|
import Makers from "./collections/Makers";
|
|
|
|
import Products from "./collections/Products";
|
|
|
|
import Retailers from "./collections/Retailers";
|
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
|
|
|
},
|
2024-04-08 08:23:38 +00:00
|
|
|
csrf: [
|
|
|
|
'https://kios.lumbung.space',
|
|
|
|
'https://admin.kios.lumbung.space',
|
|
|
|
],
|
2024-04-03 10:18:03 +00:00
|
|
|
collections: [
|
2024-04-05 08:59:09 +00:00
|
|
|
// Posts,
|
2024-04-03 10:18:03 +00:00
|
|
|
Users,
|
|
|
|
Media,
|
|
|
|
Couriers,
|
|
|
|
Dispatches,
|
|
|
|
Makers,
|
|
|
|
Products,
|
|
|
|
Retailers,
|
|
|
|
],
|
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
|
|
|
},
|
|
|
|
});
|