The sandbox's rules

These break in Zuper even when the code builds.

RuleWhat happensDo this instead
No network from UI codefetch, 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 timeimport(), CDN scripts, eval and new Function are blockedBundle everything; avoid libraries that compile code at run time
No browser storage or DOMlocalStorage, indexedDB, cookies and document aren't thereKeep state in React, or in your own backend through a server function
Bundle sizeThe bundle must stay under 500 KB compressed"runtime": "preact" (after npm install --save-dev preact)

Did this page help you?