Files
eryao/web/astro.config.mjs
T

47 lines
992 B
JavaScript
Raw Normal View History

// @ts-check
import { defineConfig } from 'astro/config';
2026-05-10 20:29:42 +08:00
import node from '@astrojs/node';
import react from '@astrojs/react';
import tailwindcss from '@tailwindcss/vite';
export default defineConfig({
2026-05-10 20:29:42 +08:00
output: 'server',
adapter: node({
mode: 'standalone',
}),
integrations: [react()],
i18n: {
locales: ['zh', 'zh_Hant', 'en'],
defaultLocale: 'zh',
routing: {
prefixDefaultLocale: true,
},
},
vite: {
plugins: [tailwindcss()],
2026-05-09 16:00:29 +08:00
server: {
port: 4322,
2026-05-09 16:00:29 +08:00
proxy: {
'/api': {
target: 'http://localhost:5775',
2026-05-09 16:00:29 +08:00
changeOrigin: true,
secure: false,
timeout: 30000,
proxyTimeout: 60000,
2026-05-09 16:00:29 +08:00
},
},
},
optimizeDeps: {
include: ['react', 'react-dom', 'react/jsx-dev-runtime'],
esbuildOptions: {
define: {
'process.env.NODE_ENV': '"development"',
},
},
},
resolve: {
dedupe: ['react', 'react-dom'],
},
},
});