Vibe Coding Bundler is a browser-based JavaScript and TypeScript bundler that leverages esbuild-wasm to perform compilation entirely within the browser environment, eliminating the need for a server. Currently at version 1.0.0, its release cadence is feature-driven as an initial offering. Key differentiators include first-class support for standard import maps, a virtual file system for in-memory bundling, and a robust plugin system with `onResolve` and `onLoad` hooks. It supports various output formats (ESM, IIFE, CJS), generates sourcemaps, and performs tree shaking. While it transpiles TypeScript and JSX, it does not perform type checking. An optional Node.js CLI is also provided for local development workflows.
npm install vibe-coding-bundlerVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to set up and use the bundler in a browser environment, including initializing esbuild-wasm, providing virtual files, configuring import maps for CDN dependencies like React, and outputting a minified ESM bundle with an inline sourcemap. It also shows how to execute the bundled output.
Ensure `await initialize()` is called only once at application startup or before the first bundler usage.
Consider pre-loading the WASM module if critical for user experience, or provide a loading indicator during the `initialize()` phase. Ensure your server correctly serves WASM files with appropriate MIME types (e.g., `application/wasm`).
Integrate `tsc --noEmit` or a similar type checker into your project's build or linting scripts to ensure type correctness.
Double-check import map syntax against the WICG specification and the examples provided. Use a 'resolver' utility or local testing to verify paths are correctly mapped. Pay attention to trailing slashes for directory-like imports.
Add `await initialize();` at the very beginning of your application logic, ensuring it completes before any `createBundler` or `bundle` calls.
Verify that your `importMap` object correctly defines the bare specifier, including any necessary trailing slashes for subpath imports. Ensure the URL provided in the import map is accessible and returns valid JavaScript.
Check the URL for correctness and ensure the CDN is accessible. If using a custom `fetcher`, add more robust error handling and logging. For browser usage, inspect the network tab for specific HTTP errors and check browser console for CORS warnings.