roles-bot/apps/website/astro.config.ts

30 lines
712 B
TypeScript
Raw Normal View History

2023-04-08 14:16:23 +02:00
import path from "path";
import { fileURLToPath } from "url";
import { defineConfig } from "astro/config";
2024-08-03 14:42:34 +02:00
import preact from "@astrojs/preact";
2023-04-08 14:16:23 +02:00
import sitemap from "@astrojs/sitemap";
import tailwind from "@astrojs/tailwind";
import cloudflare from "@astrojs/cloudflare";
2024-08-03 14:42:34 +02:00
2023-04-08 14:16:23 +02:00
import { CONFIG } from "./src/config";
2023-04-08 14:16:23 +02:00
const __dirname = path.dirname(fileURLToPath(import.meta.url));
2023-04-09 22:00:25 +02:00
// https://astro.build/config
2023-04-08 14:16:23 +02:00
export default defineConfig({
2024-08-03 14:42:34 +02:00
site: CONFIG.origin,
2024-08-03 20:23:12 +02:00
integrations: [sitemap(), tailwind(), preact()],
2024-08-03 14:42:34 +02:00
output: "server",
adapter: cloudflare(),
2024-08-03 20:23:12 +02:00
security: {
checkOrigin: true,
},
2024-08-03 14:42:34 +02:00
vite: {
resolve: {
alias: {
"~": path.resolve(__dirname, "./src"),
},
},
},
});