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

31 lines
758 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";
import auth from "auth-astro";
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,
integrations: [sitemap(), tailwind(), auth(), preact()],
output: "server",
adapter: cloudflare(),
vite: {
resolve: {
alias: {
"~": path.resolve(__dirname, "./src"),
},
},
2024-08-03 15:07:06 +02:00
ssr: {
external: ["node:path"],
},
2024-08-03 14:42:34 +02:00
},
});