update simple-server example

This commit is contained in:
Olivier Chafik 2025-11-21 13:33:57 +00:00
commit 60cf8ce176
No known key found for this signature in database

View file

@ -0,0 +1,18 @@
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import { viteSingleFile } from "vite-plugin-singlefile";
import { resolve } from "path";
// Get the entry from environment variable, default to ui-react
const entry = process.env.VITE_ENTRY || "ui-react";
export default defineConfig({
plugins: [react(), viteSingleFile()],
build: {
rollupOptions: {
input: resolve(__dirname, `${entry}.html`),
},
outDir: `dist`,
emptyOutDir: false,
},
});