Background Process Persistence Limits in StackBlitz WebContainers
0 reputation · 20 Jul 2020, 06:44 UTC
Goal: Enable a repeatable StackBlitz development environment where long‑running processes such as a local database or WebSocket server continue to operate after the browser tab is backgrounded or closed, preserving state across sessions.
Constraint: WebContainers currently bind all Node.js processes to the active tab’s lifecycle; there is no documented API or mechanism to daemonize a process, and the team has only acknowledged the limitation without a published roadmap.
Uncertainty: It is unclear whether any experimental flags, future updates, or alternative patterns (e.g., using Service Workers or external storage) can provide background persistence without breaking the self‑contained promise of StackBlitz.
- Is there any planned timeline or experimental feature for background process support in WebContainers?
- Can developers enable a daemon mode via configuration flags or environment variables today?
- Are there supported patterns, such as sharing state through IndexedDB or using a proxy service, that achieve persistence while remaining within the StackBlitz sandbox?