seedproject-web/app/astro.config.mjs
Carlos Arias 43ae1e2015 Baseline: full site build (brand, pages, DB, agent-editable)
Establishes the deploy baseline on main so the admin agent's publish/rollback
has a clean starting point. Everything built to date: sumi-e brand system,
homepage, projects (DB-driven case studies), resume, about, services +
website-design detail, contact form + DB, changelog, favicon + share card.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DoFYZY9gkGPNDqZ7NuEa9a
2026-07-23 20:21:28 +00:00

39 lines
No EOL
1.4 KiB
JavaScript

import { readFileSync } from "node:fs";
import { defineConfig } from "astro/config";
const siteConfig = JSON.parse(
readFileSync(new URL("./src/config/site.json", import.meta.url)),
);
import mdx from "@astrojs/mdx";
import react from "@astrojs/react";
import tailwindcss from "@tailwindcss/vite";
const site =
process.env.SITE_URL || process.env.PUBLIC_SITE_URL || siteConfig.url;
export default defineConfig({
site,
// astroagent overrides outDir for isolated preview builds (PREVIEW_OUT);
// falls back to the live output for normal/cron builds.
outDir: process.env.PREVIEW_OUT || "../public",
// For previews, PREVIEW_BASE prefixes asset paths (/_preview/<id>) so the
// preview is self-contained and doesn't pull _astro/fonts from the live site.
base: process.env.PREVIEW_BASE || undefined,
integrations: [mdx(), react()],
vite: {
plugins: [tailwindcss()],
resolve: {
alias: {
// shadcn / 21st.dev convention — paste components in unmodified.
"@": new URL("./src", import.meta.url).pathname,
// Those components import useTheme from "next-themes", which is a
// Next.js package. Point it at a local shim that drives the existing
// class-based theme instead. See src/lib/next-themes.ts.
"next-themes": new URL("./src/lib/next-themes.ts", import.meta.url).pathname,
},
},
build: {
emptyOutDir: false,
},
},
});