The sandbox's rules
These break in Zuper even when the code builds.
| Rule | What happens | Do this instead |
|---|---|---|
| No network from UI code | fetch, XMLHttpRequest, WebSocket, EventSource and importScripts throw "… is not available to Zuper apps." | api.* for Zuper data, a server function's ctx.fetch for anything else |
| No code loaded at run time | import(), CDN scripts, eval and new Function are blocked | Bundle everything; avoid libraries that compile code at run time |
| No browser storage or DOM | localStorage, indexedDB, cookies and document aren't there | Keep state in React, or in your own backend through a server function |
| Bundle size | The bundle must stay under 500 KB compressed | "runtime": "preact" (after npm install --save-dev preact) |
Updated about 1 hour ago
Did this page help you?
