update simple-server example
This commit is contained in:
parent
c8bdca6935
commit
60cf8ce176
1 changed files with 3599 additions and 240 deletions
18
examples/simple-server/vite.config.ts
Normal file
18
examples/simple-server/vite.config.ts
Normal 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,
|
||||
},
|
||||
});
|
||||
Loading…
Reference in a new issue