esbuild-standalone v0.0.19 provides a standalone build of Esbuild for use in browsers, leveraging Service Worker and esbuild-wasm to enable JSX/TSX transpilation without a Node.js build step. It is an alternative to @babel/standalone and esm.sh/tsx, offering faster compilation via Esbuild. It supports inline (no SW) and external (SW) setups, works with import maps, and handles script types like text/babel, text/jsx, text/tsx, etc. Release cadence is irregular; version 0.0.x suggests early development. Key differentiators: easy prototyping in HTML, Service Worker caching, and use of Esbuild's speed.
npm install esbuild-standaloneNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows inline setup with importmap and JSX transpilation via esbuild-standalone without a build step.
Use ?external=react in importmap URLs as shown in the quickstart.
Place service-worker.js in your public root or use data-sw-url to specify alternative path.
Set up Service Worker files as described in the documentation for full functionality.
Pin a specific version in production or use alternative like @babel/standalone.
Preload or cache the Wasm file using Service Worker to improve performance.
Ensure the service-worker.js file is accessible at the correct path and served with Content-Type: text/javascript.
Serve service-worker.js from same origin (root path) or use data-sw-url with a correct URL.
Define import map with correct URLs and ?external query for singleton libraries like React.