1import { defineConfig } from "vite";
2import react from "@vitejs/plugin-react";
3import { viteSingleFile } from "vite-plugin-singlefile";
5// Builds the whole app (JS + CSS, including three.js) inlined into a single
6// dist/index.html, so the numbl `.m` can read it with `fileread` and pass it to
7// uihtml (HTMLSource) — no supporting files, works in numbl and real MATLAB.
8export default defineConfig({
9 plugins: [react(), viteSingleFile()],
10 build: {
11 target: "esnext",
12 cssCodeSplit: false,
13 assetsInlineLimit: 100_000_000,
14 chunkSizeWarningLimit: 100_000_000,
15 },
16});