2024-09-08 13:14:02 +02:00
|
|
|
// @ts-check
|
2024-10-20 12:05:32 +02:00
|
|
|
import { defineConfig, envField } from "astro/config"
|
2024-10-12 18:29:44 +02:00
|
|
|
import paraglide from "@inlang/paraglide-astro"
|
2025-02-15 13:29:01 +01:00
|
|
|
import tailwindcss from "@tailwindcss/vite"
|
2024-09-25 22:20:47 +02:00
|
|
|
import sitemap from "@astrojs/sitemap"
|
|
|
|
import svelte from "@astrojs/svelte"
|
2024-10-12 18:29:44 +02:00
|
|
|
import node from "@astrojs/node"
|
|
|
|
import mdx from "@astrojs/mdx"
|
2024-10-09 20:33:18 +02:00
|
|
|
import icon from "astro-icon"
|
2024-10-06 13:27:18 +02:00
|
|
|
|
2024-10-12 18:29:44 +02:00
|
|
|
import { loadEnv } from "vite"
|
|
|
|
|
2025-02-15 23:00:38 +01:00
|
|
|
const { URL } = process.env.NODE_ENV
|
|
|
|
? loadEnv(process.env.NODE_ENV, process.cwd(), "")
|
|
|
|
: { URL: "http://localhost:3000" }
|
2024-09-08 13:14:02 +02:00
|
|
|
|
|
|
|
// https://astro.build/config
|
2024-09-25 22:20:47 +02:00
|
|
|
export default defineConfig({
|
2025-02-15 23:00:38 +01:00
|
|
|
site: URL,
|
2024-10-12 18:29:44 +02:00
|
|
|
output: "server",
|
2024-09-25 22:20:47 +02:00
|
|
|
i18n: {
|
|
|
|
defaultLocale: "nb",
|
2025-02-15 13:29:01 +01:00
|
|
|
locales: ["nb", "en"],
|
2024-09-25 22:20:47 +02:00
|
|
|
},
|
2024-10-09 21:30:05 +02:00
|
|
|
integrations: [
|
|
|
|
sitemap(),
|
|
|
|
mdx(),
|
|
|
|
svelte(),
|
|
|
|
icon(),
|
|
|
|
paraglide({
|
|
|
|
project: "./project.inlang",
|
2025-02-15 19:25:44 +01:00
|
|
|
outdir: "./src/paraglide",
|
2025-02-15 13:29:01 +01:00
|
|
|
}),
|
2024-10-12 18:29:44 +02:00
|
|
|
],
|
|
|
|
adapter: node({
|
2025-02-15 13:29:01 +01:00
|
|
|
mode: "standalone",
|
2024-10-20 12:05:32 +02:00
|
|
|
}),
|
2025-02-15 13:29:01 +01:00
|
|
|
vite: {
|
|
|
|
plugins: [tailwindcss()],
|
|
|
|
},
|
2024-10-20 12:05:32 +02:00
|
|
|
env: {
|
|
|
|
schema: {
|
|
|
|
DOMAIN: envField.string({ context: "client", access: "public" }),
|
|
|
|
URL: envField.string({ context: "client", access: "public" }),
|
|
|
|
GIT_URL: envField.string({ context: "client", access: "public" }),
|
2025-02-15 13:29:01 +01:00
|
|
|
STATUS_URL: envField.string({ context: "client", access: "public" }),
|
|
|
|
},
|
|
|
|
},
|
|
|
|
})
|