39 lines
815 B
JavaScript
39 lines
815 B
JavaScript
// @ts-check
|
|
import { defineConfig } from 'astro/config';
|
|
import react from '@astrojs/react';
|
|
import tailwindcss from '@tailwindcss/vite';
|
|
|
|
export default defineConfig({
|
|
integrations: [react()],
|
|
i18n: {
|
|
locales: ['zh', 'zh_Hant', 'en'],
|
|
defaultLocale: 'zh',
|
|
routing: {
|
|
prefixDefaultLocale: true,
|
|
},
|
|
},
|
|
vite: {
|
|
plugins: [tailwindcss()],
|
|
server: {
|
|
proxy: {
|
|
'/api': {
|
|
target: 'https://api.meeyao.com',
|
|
changeOrigin: true,
|
|
secure: true,
|
|
},
|
|
},
|
|
},
|
|
optimizeDeps: {
|
|
include: ['react', 'react-dom', 'react/jsx-dev-runtime'],
|
|
esbuildOptions: {
|
|
define: {
|
|
'process.env.NODE_ENV': '"development"',
|
|
},
|
|
},
|
|
},
|
|
resolve: {
|
|
dedupe: ['react', 'react-dom'],
|
|
},
|
|
},
|
|
});
|