29 lines
1.2 KiB
JavaScript
29 lines
1.2 KiB
JavaScript
import { defineConfig } from "astro/config"
|
|
import mdx from "@astrojs/mdx"
|
|
import sitemap from "@astrojs/sitemap"
|
|
import solidJs from "@astrojs/solid-js"
|
|
import node from "@astrojs/node"
|
|
import tailwindcss from "@tailwindcss/vite"
|
|
|
|
// https://astro.build/config
|
|
export default defineConfig({
|
|
site: "https://spaghet.io",
|
|
integrations: [mdx(), sitemap(), solidJs()],
|
|
output: "server",
|
|
adapter: node({ mode: "ssr" }),
|
|
vite: {
|
|
plugins: [tailwindcss()],
|
|
optimizeDeps: {
|
|
// Client-island deps that are not reachable from the SSR entry graph are
|
|
// discovered mid-session, which makes Vite re-optimize and bump the browserHash.
|
|
// Every already-served island module then 504s with "Outdated Optimize Dep",
|
|
// hydration aborts, and the Solid lists on /blog, /projects and /search stay
|
|
// empty. Pre-declaring them bundles them at startup so the hash never changes
|
|
// underneath a page. Keep this list in sync with the imports of every
|
|
// src/components/*.tsx island (solid-js, @lib/utils -> clsx + tailwind-merge,
|
|
// @lib/search -> fuse.js).
|
|
include: ["solid-js", "solid-js/web", "clsx", "tailwind-merge", "fuse.js"],
|
|
},
|
|
}
|
|
})
|