stackblitz-install-auth

Featured

Install the WebContainer API and configure StackBlitz SDK for browser-based Node.js. Use when setting up WebContainers, embedding StackBlitz projects, or initializing the @stackblitz/sdk package. Trigger: "install stackblitz", "setup webcontainers", "stackblitz SDK".

AI & Automation 2,359 stars 334 forks Updated today MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# StackBlitz Install & Auth ## Overview Set up the WebContainer API for running Node.js in the browser, or the StackBlitz SDK for embedding interactive code editors. WebContainers require no auth -- they run entirely client-side. The StackBlitz SDK is for embedding projects from stackblitz.com. ## Prerequisites - Node.js 18+ for build tooling - Modern browser with SharedArrayBuffer support (requires HTTPS + COOP/COEP headers) ## Instructions ### Step 1: Install WebContainer API ```bash npm install @webcontainer/api ``` ### Step 2: Install StackBlitz SDK (for embedding) ```bash npm install @stackblitz/sdk ``` ### Step 3: Configure Required HTTP Headers WebContainers require cross-origin isolation. Add these headers to your server: ```typescript // Express middleware app.use((req, res, next) => { res.setHeader('Cross-Origin-Embedder-Policy', 'require-corp'); res.setHeader('Cross-Origin-Opener-Policy', 'same-origin'); next(); }); ``` ```javascript // Vite config export default defineConfig({ server: { headers: { 'Cross-Origin-Embedder-Policy': 'require-corp', 'Cross-Origin-Opener-Policy': 'same-origin', }, }, }); ``` ### Step 4: Verify WebContainer Boot ```typescript import { WebContainer } from '@webcontainer/api'; const wc = await WebContainer.boot(); console.log('WebContainer booted successfully'); // Verify filesystem works await wc.mount({ 'test.txt': { file: { contents: 'Hello WebContainers!' } } }); const content = await wc.f...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
8 months ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category