Try Bun adapter and enable a couple of experimental features

This commit is contained in:
Korbs 2024-08-10 20:10:00 -04:00
parent 0bf467c3a4
commit 709592a9d7

View file

@ -3,6 +3,8 @@ import node from '@astrojs/node'
import vue from '@astrojs/vue' import vue from '@astrojs/vue'
import astroI18next from "astro-i18next" import astroI18next from "astro-i18next"
import mdx from '@astrojs/mdx' import mdx from '@astrojs/mdx'
import bun from "@nurodev/astro-bun";
// https://astro.build/config // https://astro.build/config
export default defineConfig({ export default defineConfig({
@ -25,15 +27,22 @@ export default defineConfig({
}, },
// Use Server-Side Rendering // Use Server-Side Rendering
output: 'server', output: 'server',
adapter: node({ adapter: bun(),
mode: 'standalone'
}),
// Vite // Vite
vite: { vite: {
server: { server: {
hmr: true // Auto Reload hmr: true // Auto Reload
} }
}, },
// Experimental
experimental: {
directRenderScript: true,
clientPrerender: true
},
prefetch: {
prefetchAll: true,
defaultStrategy: "viewport"
},
// Others // Others
devToolbar: { devToolbar: {
enabled: false enabled: false