refactor(nuxt): make nitro preset conditional

set nitro preset to `bun` in production, otherwise keep `node-server`
This commit is contained in:
parent ab49836a08
commit 6a65781950
Signed by: tablet
GPG Key ID: 924A5F6AF051E87C

@ -84,10 +84,10 @@ export default defineNuxtConfig({
esbuild: { esbuild: {
options: { options: {
minify: true, minify: true,
sourceMap: "inline", // sourceMap: "inline",
}, },
}, },
preset: "node-server", preset: process.env.NODE_ENV == "production" ? "bun" : "node-server",
}, },
routeRules: { routeRules: {
"/": cac, "/": cac,
@ -161,4 +161,11 @@ export default defineNuxtConfig({
exclude: ["./.nuxt/types/auth.d.ts"], exclude: ["./.nuxt/types/auth.d.ts"],
}, },
}, },
imports: {
autoImport: true,
dirsScanOptions: {
types: true,
},
},
}); });