@struktoai/mirage-browser runs a workspace inside the page: the shell, the
commands and an in-memory filesystem, with no server and no credentials.
Create the app
1
Start a Vite app
Vite needs Node 20.19+ or 22.12+:With pnpm, also add
@struktoai/mirage-core: Vite’s dev server finds
Mirage’s WebAssembly files through it.2
Replace src/main.ts
src/main.ts
MountMode.WRITE lets the shell create and change files under /data.3
Run it
hello mirage.Next steps
Keep files in the browser
OPFS keeps a workspace’s files across page loads.
Run python3 in the page
Pyodide in a worker, with workspace files.
Browser limitations
CORS, storage quotas and Node-only mounts.