mirror of
https://github.com/supabase/supabase.git
synced 2026-10-14 21:59:16 +03:00
34 lines
708 B
TypeScript
34 lines
708 B
TypeScript
import devServer from "@hono/vite-dev-server";
|
|
import { defineConfig } from "vite";
|
|
|
|
// Change the import to use your runtime specific build
|
|
import build from "@hono/vite-build/node";
|
|
|
|
export default defineConfig(({ mode }) => {
|
|
if (mode === "client")
|
|
return {
|
|
esbuild: {
|
|
jsxImportSource: "hono/jsx/dom", // Optimized for hono/jsx/dom
|
|
},
|
|
build: {
|
|
rollupOptions: {
|
|
input: "./src/client.tsx",
|
|
output: {
|
|
entryFileNames: "static/client.js",
|
|
},
|
|
},
|
|
},
|
|
};
|
|
|
|
return {
|
|
plugins: [
|
|
build({
|
|
entry: "src/index.tsx",
|
|
}),
|
|
devServer({
|
|
entry: "src/index.tsx",
|
|
}),
|
|
],
|
|
};
|
|
});
|