hknsh-house/vite.config.ts

24 lines
464 B
TypeScript
Raw Permalink Normal View History

2024-11-10 17:25:53 +00:00
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"),
},
},
});