hknsh-house/vite.config.ts
2024-11-10 17:25:53 +00:00

23 lines
464 B
TypeScript

import path from "node:path";
import preact from "@preact/preset-vite";
import { defineConfig } from "vite";
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
preact({
prerender: {
enabled: true,
renderTarget: "#app",
additionalPrerenderRoutes: ["/404"],
previewMiddlewareEnabled: true,
previewMiddlewareFallback: "/404",
},
}),
],
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),
},
},
});