@seanhogg/builderforce-webcontainers-core
v2026.10.12
Published
BuilderForce WebContainers — core. A runtime-agnostic in-browser dev server: virtual file system, module resolution, import rewriting to a package CDN, CSS/JSON/asset modules and project detection. No COOP/COEP required.
Downloads
2,896
Maintainers
Readme
@seanhogg/builderforce-webcontainers-core
The runtime-agnostic dev server behind
BuilderForce WebContainers.
It turns a project held in a VirtualFileSystem into browser-ready responses:
compiled ES modules, CSS/JSON/asset wrappers and the HTML document. It never
listens on anything; you call handle(path, search).
import * as esbuild from 'esbuild';
import { VirtualFileSystem, DevServer, createEsbuildTransformer } from '@seanhogg/builderforce-webcontainers-core';
const fs = new VirtualFileSystem();
fs.writeTree({ 'index.html': '...', 'src/main.tsx': '...' });
const server = new DevServer({ fs, transformer: createEsbuildTransformer(esbuild), base: '/preview/' });
const res = await server.handle('/src/main.tsx'); // { status, headers, body }For the in-browser runtime, use
@seanhogg/builderforce-webcontainers. MIT licensed.
