// @ts-check
import { defineConfig } from "astro/config";

const extraAllowedHosts = (process.env.ALLOWED_HOSTS ?? "")
	.split(",")
	.map((host) => host.trim())
	.filter(Boolean);

// https://astro.build/config
export default defineConfig({
	output: "static",
	site: "https://royal-pop-accessory.com",
	// adapter: node({
	// 	mode: "standalone",
	// }),
	server: {
		host: true,
		allowedHosts: ["localhost", ...extraAllowedHosts],
	},
	vite: {
		css: {
			preprocessorOptions: {
				scss: {
					additionalData: `@use "/src/styles/vars" as *; \n`,
				},
			},
		},
	},
});
