-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathastro.config.mjs
More file actions
40 lines (36 loc) · 1.31 KB
/
astro.config.mjs
File metadata and controls
40 lines (36 loc) · 1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// @ts-check
import tailwindcss from '@tailwindcss/vite';
import { defineConfig } from 'astro/config';
import node from '@astrojs/node';
import react from '@astrojs/react';
import sitemap from '@astrojs/sitemap';
// https://astro.build/config
export default defineConfig({
// Set your site URL here or via SITE_URL environment variable
// This is required for sitemap generation
site: process.env.SITE_URL || 'https://synbioreactor.de', // TODO: Update with your actual production URL
output: 'server', // Enable server-side rendering for API routes
adapter: node({
mode: 'standalone', // or 'middleware' depending on your deployment
}),
vite: {
plugins: [tailwindcss()],
assetsInclude: ['**/*.glb'],
optimizeDeps: {
// Fix intermittent dev-only 504 "Outdated Optimize Dep" for Rapier dynamic import.
// This makes sure the wasm/js shim is prebundled deterministically.
include: ['@dimforge/rapier3d-compat'],
},
resolve: {
// Prevent multiple React copies (fixes "Invalid hook call" in islands)
dedupe: ['react', 'react-dom'],
},
},
integrations: [
react(),
sitemap({
// Exclude API routes and other non-page routes from sitemap
filter: (page) => !page.includes('/api/') && !page.includes('/robots.txt'),
}),
],
});