Production Bundle

Building a Production Bundle with Vite

npm 2,036 run build runs vite build, then Workbox 13,023 . Vite 25,978 bundles and minifies src/ into www/, adds a content hash to each asset name so it can be cached forever, and points index.html at the hashed files:

Building BookNest for productionShell
npm run build
Output
vite v8.3.0 building client environment for production...
✓ 242 modules transformed.
...
www/index.html                                       1.08 kB │ gzip:   0.54 kB
...
www/assets/index-CMe8jdJR.css                      507.18 kB │ gzip:  73.80 kB
www/assets/index-CLfgE4VO.js                       856.57 kB │ gzip: 224.75 kB
✓ built in 14.84s
...
The service worker will precache 15 URLs, totaling 1.99 MB.

The script is large because app.js imports framework7/bundle, every component; the lazy-module route of Plugins and Bindings is how to shrink it. vite.config.js sets base: '', so the built page uses relative paths (./assets/...) and runs from any folder, even file:// (Electron for the Desktop).