Files
blog-frontend-v2/astro.config.mjs
passthem 5e5f13a949
All checks were successful
continuous-integration/drone/push Build is passing
添加 Redis 支持
2026-04-09 15:57:28 +08:00

49 lines
1.1 KiB
JavaScript

// @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: '',
}),
},
},
})