WebContainers Documentation

repository·main·Indexed 26 days ago

https://github.com/stackblitz/webcontainer-core

Technology for running complete, isolated development environments, including Node.js, package managers, and servers, directly inside a web browser. Includes guides on the WebContainer API, browser configuration, and tools like Codeflow and Web Publisher.

Tokens
381
Snippets
0
Records
4
Agent score
39%

What's inside WebContainers

  1. Automate error reproduction using .stackblitzrc

    main
    To make a bug report easier to reproduce, configure your StackBlitz project to run the problematic command automatically on startup. This is done by including a .stackblitzrc configuration file in your project root.
  2. Create a reproducible bug report for WebContainer

    main

    When reporting an issue with WebContainer, provide a minimal, reproducible example. To ensure a high-quality report, follow these steps:

    1. Verify locally: Confirm the project runs correctly on your local machine with a standard Node.js installation to rule out project-specific issues.
    2. Auto-execute erroneous commands: Use a .stackblitzrc configuration file to ensure the command that triggers the error runs automatically when the StackBlitz project starts.
    3. Isolate API calls: Instead of using a complex framework, try to create a simple Node.js script with minimal dependencies that triggers the specific faulty API call.
    4. Use DevTools for debugging: You can use the browser DevTools to inspect your code and dependencies, or add debugger statements to your files to step through execution.