spicebook/frontend/astro.config.mjs
Ryan Malloy bfab38e954 Add clock and layers icons to astro-icon include list
RecentNotebooks component uses these icons but they weren't in the
explicit include whitelist, causing a runtime AstroIconError.
2026-03-06 14:48:15 -07:00

41 lines
1.3 KiB
JavaScript

import { defineConfig } from 'astro/config';
import react from '@astrojs/react';
import node from '@astrojs/node';
import icon from 'astro-icon';
import tailwindcss from '@tailwindcss/vite';
export default defineConfig({
output: 'server',
adapter: node({ mode: 'standalone' }),
integrations: [
react(),
icon({ include: { lucide: ['plus', 'book-open', 'zap', 'cpu', 'activity', 'circuit-board', 'file-text', 'chevron-down', 'chevron-right', 'arrow-right', 'check-circle-2', 'clock', 'layers'] } }),
],
telemetry: false,
devToolbar: { enabled: false },
vite: {
plugins: [tailwindcss()],
ssr: { external: ['@resvg/resvg-js'] },
build: {
// CodeMirror + uPlot + React naturally exceeds 500kB minified
chunkSizeWarningLimit: 700,
rollupOptions: { external: ['@resvg/resvg-js'] },
},
optimizeDeps: { exclude: ['@resvg/resvg-js'] },
server: {
host: '0.0.0.0',
// Allow the Caddy reverse proxy domain (Vite 7+ blocks unknown Host headers)
...(process.env.SPICEBOOK_DOMAIN && {
allowedHosts: [process.env.SPICEBOOK_DOMAIN],
}),
...(process.env.VITE_HMR_HOST && {
hmr: {
host: process.env.VITE_HMR_HOST,
protocol: 'wss',
clientPort: 443
}
})
}
}
});