// @ts-check import { defineConfig } from 'astro/config'; import tailwindcss from '@tailwindcss/vite'; import mdx from '@astrojs/mdx'; import sitemap from '@astrojs/sitemap'; import node from '@astrojs/node'; import icon from 'astro-icon'; /** * Dev-only routes (style preview); never part of a production build. * @type {import('astro').AstroIntegration} */ const devRoutes = { name: 'dev-routes', hooks: { 'astro:config:setup': ({ command, injectRoute }) => { if (command !== 'dev') return; injectRoute({ pattern: '/styleguide', entrypoint: './src/dev/Styleguide.astro' }); }, }, }; // https://astro.build/config export default defineConfig({ site: 'https://ta1sph.info', trailingSlash: 'always', // Static by default; only routes with `export const prerender = false` (view counter API) run on the server. output: 'static', adapter: node({ mode: 'standalone' }), integrations: [mdx(), sitemap(), icon({ include: { tabler: ['*'] } }), devRoutes], vite: { plugins: [tailwindcss()], }, });