// @ts-check import { defineConfig, envField } from 'astro/config' import node from '@astrojs/node' import svelte from '@astrojs/svelte' import vue from '@astrojs/vue' import react from '@astrojs/react' import icon from 'astro-icon' const ICON2_URL = 'https://cdn.passthem.top/sharex/2026/03/%E6%93%A6%E6%B1%97%E5%90%8E_%E6%96%B9%E5%BD%A2.png.upscale.png' // https://astro.build/config export default defineConfig({ output: 'server', adapter: node({ mode: 'standalone', }), integrations: [svelte(), vue(), react(), icon()], site: 'https://passthem.top', redirects: { '/assets/icon-qq-BThBBmjV.jpg': ICON2_URL, }, vite: { build: { rollupOptions: { external: ['node:crypto', 'buffer', 'keyv'], }, }, }, // 环境变量管理 env: { schema: { LEGACY_BACKEND_URL_SSR: envField.string({ context: 'server', access: 'secret', default: 'https://legacy.passthem.top/api', }), REDIS_URL: envField.string({ context: 'server', access: 'secret', default: '', }), }, }, })