Build for web & package for desktop
vgai ships a browser-first build: npm run build:web produces a static bundle you can drop on
itch.io or any static host. Desktop packaging is wired through electron-builder. The
transcript below is real captured output.
Build for web & package for desktop
# transcript pending capture β run: node site/media/capture-cli.mjs site/media/capture-cli.mjs -
Build the web bundle.
Terminal window npm run build:web # = tsc && vite build --mode web && zip the distThe bundle step (
vite build --mode web) emits a rootindex.html(the editor) plus the playground and surfaces intodist/β a self-contained browser app. -
Zip it for itch.io.
Terminal window cd dist && zip -r ../vgai-web.zip .vgai-web.zipis an itch.io-ready HTML5 upload β no server required. -
Desktop packaging.
Terminal window npx electron-builder --versionnpm run package(andpackage:editorfor the editor app) wrap electron-builder to produce desktop builds.
Recap
New functionality
- Built the browser-first static bundle
- Produced the itch.io web zip
- Saw the desktop packaging tooling
New concepts & skills
- build:web = tsc + vite (mode web) + zip β a static HTML5 bundle
- vgai-web.zip uploads to itch.io with no server
- desktop (electron-builder) is wired but unproven E2E; Steam/mobile scaffolds are parked
Next lesson β Tooling overview