@ -1,16 +1,27 @@
|
||||
// @ts-check
|
||||
import { defineConfig } from 'astro/config';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
|
||||
import tailwindcss from '@tailwindcss/vite';
|
||||
|
||||
import alpinejs from '@astrojs/alpinejs';
|
||||
|
||||
|
||||
import node from '@astrojs/node';
|
||||
|
||||
|
||||
// https://astro.build/config
|
||||
export default defineConfig({
|
||||
vite: {
|
||||
plugins: [tailwindcss()]
|
||||
plugins: [tailwindcss()],
|
||||
resolve: {
|
||||
alias: {
|
||||
// 路径别名:@ -> 项目 src 目录(与 tsconfig paths 一致)
|
||||
'@': fileURLToPath(new URL('./src', import.meta.url)),
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
i18n: {
|
||||
defaultLocale: 'en',
|
||||
locales: ['en', 'cn'],
|
||||
@ -18,9 +29,15 @@ export default defineConfig({
|
||||
prefixDefaultLocale: true, // 英文在根路径 /shows,中文在 /cn/shows
|
||||
},
|
||||
},
|
||||
|
||||
build: {
|
||||
// 示例:在构建过程中生 成`page.html` 而不是 `page/index.html`。
|
||||
// format: 'file'
|
||||
},
|
||||
integrations: [alpinejs()]
|
||||
|
||||
integrations: [alpinejs()],
|
||||
|
||||
adapter: node({
|
||||
mode: 'standalone'
|
||||
})
|
||||
});
|
||||
Reference in New Issue
Block a user