CDN Deployment
Streak.js output is fully static and can be served from any CDN. The only requirement specific to Streak is that the /assets/ path is preserved so the asset worker can fetch runtime packages.
Static Files in out/
The streak-forge pre-build command writes all output to out/. These are plain HTML files, along with any JS, CSS, and image files from public/. Upload the contents of out/ to your CDN origin.
The /assets/ Path Requirement
The asset worker fetches files via:
/assets/<path>
This maps to public/assets/<path> in the source project. When deploying to a CDN, ensure this path mapping is preserved. If /assets/ is served from a different path or a different origin without proper CORS headers, gDom.loadPackage() calls will fail silently.
Caching Considerations
The asset worker caches loaded assets in memory for the lifetime of the page. At the CDN level, static assets in /assets/ can be cached aggressively because Streak versions them (the v field in the w-m metadata). HTML files should use shorter cache durations or cache-busting to ensure updated pages are served promptly.
Routing
Streak generates one index.html per renderId directory. CDN and web server routing must map URL paths to the correct index.html files. For example, /about should serve out/aboutRenderId/index.html. How this mapping is configured depends on the CDN or web server in use.
No specific CDN configuration is documented here — consult your CDN provider's documentation for origin setup and routing rules.