WebContainer works in Brave almost out of the box. However, it might require a small configuration change.
By default, Brave’s “Shields” feature blocks Service Workers and cookies from third-party domains.
When you visit a WebContainer-enabled project on stackblitz.com, StackBlitz tries to register a Service Worker for the domain
<project_name>.stackblitz.io. Since it’s considered a third-party domain, Brave will reject it.
- Visit a WebContainer-based project, for instance https://www.stackblitz.com/edit/nextjs. The project’s boot sequence might stay stuck on the “Running start command” step:
- Click on the “Shields” icon at the right of the address bar, then click on “Advanced View”.
- In the advanced view, change the “Cross-site cookies blocked” option to “All cookies allowed”.
Brave will reload the page, and you should get a working project: