Skip to content

Astro.config

FieldValue
TypeSkill Resource
Source~/.copilot/skills/frontend/templates/astro-starter/astro.config.mjs
DescriptionNot specified

Source Content

// @ts-check
import { defineConfig } from "astro/config";
import node from "@astrojs/node";
// =============================================================================
// astro.config.mjs — dmwd-io standard Astro 5 (SSR) configuration.
//
// output: "server" every route is SSR by default; opt individual
// marketing/static pages OUT with
// `export const prerender = true` in their frontmatter.
// adapter: node() @astrojs/node in "standalone" mode produces a
// mode: "standalone" self-contained ./dist/server/entry.mjs that listens
// on HOST/PORT — exactly what a k8s Deployment needs.
// No platform-locked adapter (Vercel/Netlify/Cloudflare).
//
// See ADR-027 (default tech stack) and the astro-architect skill for the
// per-page output-mode and per-island hydration decisions this file assumes.
// =============================================================================
export default defineConfig({
output: "server",
adapter: node({ mode: "standalone" }),
// The container binds 0.0.0.0:4321; override via HOST/PORT env in the Pod.
server: {
host: true,
port: 4321,
},
// Built-in <Image> with modern formats. Served locally by default; point at
// a CDN endpoint in production if one exists.
image: {
// Allowed remote image hosts go here, e.g.:
// domains: ["images.dmwd.io"],
},
// SPA-like navigation without shipping an SPA.
// (View Transitions are enabled per-page via the <ClientRouter /> component.)
vite: {
// Project-specific Vite overrides go here. Keep it empty by default.
},
});