Something went wrong. Try again.
Something went wrong. Try again.
123456789101112131415161718192021222324import { defineConfig } from "vite";
// Burokku runs one classic script, so each bundle is an IIFE, and Vite builds// one IIFE per run: `vite build` makes the app, and `vite build --mode harness`// makes the renderer tests' harness next to it. JSX compiles as tsconfig.json// says, through @burokku/react's JSX runtime.export default defineConfig(({ mode }) => { const harness = mode === "harness"; return { // React picks its production build from NODE_ENV, which QuickJS lacks. define: { "process.env.NODE_ENV": JSON.stringify("production") }, build: { lib: { entry: harness ? "tests/harness.ts" : "src/main.tsx", formats: ["iife"], name: harness ? "BurokkuReactHarness" : "BurokkuReactExample", fileName: () => (harness ? "harness.js" : "app.js"), }, emptyOutDir: !harness, minify: false, }, };});