Registry / web-framework / react-esbuild

react-esbuild

JSON →
library3.4.9jsnpmunverified

A CLI tool to scaffold React projects using esbuild as the bundler, similar to Create React App (CRA) but significantly faster due to esbuild and SWC transpilation. Current version 3.4.9 supports Node.js 16+. It generates a minimal React template with built-in development server, production builds, environment variable support (REACT_APP_ prefix), and testing via jest. Released sporadically, last update in 2023. Differentiators: extreme speed (milliseconds), lightweight alternative to CRA, optional bun runtime support, and ES5 transpilation via SWC. Not actively maintained.

npm install react-esbuild
INSTALL
IMPORT
SIG · REACT-ESBUILD
R
react-esbuild
web-frameworkjavascriptv3.4.9
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

react-esbuild CLI
✓ npx react-esbuild@latest my-app
✗ npm install react-esbuild --save
This is a CLI tool, not a library. Install globally or use npx/bunx.
REACT_APP_* env variables
✓ console.log(REACT_APP_MY_VAR)
✗ console.log(process.env.REACT_APP_MY_VAR)
Environment variables are injected directly as globals by esbuild, not via process.env.
test setup
✓ import { render, screen } from '@testing-library/react'
✗ const { render, screen } = require('@testing-library/react')
Uses ESM imports by default. CommonJS require may fail depending on project configuration.

Scaffold a new React project with esbuild, install dependencies, and start the dev server.

npx react-esbuild@latest my-react-app cd my-react-app npm install npm run start-js
react-esbuild --version
Debug
Known issues
gotchaEnvironment variables must have REACT_APP_ prefix and are accessed directly (e.g., REACT_APP_MY_VAR), not via process.env.
fix
Define vars in .env with REACT_APP_ prefix; use as global variable without process.env.
affects: *
gotchabunx may use a cached old version; delete bun temp cache to force latest.
fix
On Windows delete C:\Users\Administrator\AppData\Local\Temp\react-esbuild; on Linux rm -rf ~/.bun and reinstall bun.
affects: *
deprecatedThe package is not actively maintained; last release in 2023. Consider using Vite or Next.js for modern React projects.
fix
Migrate to a more actively maintained tool like Vite (npm create vite@latest) or Next.js.
affects: *
gotchaGlobal installation via npm i react-esbuild -g may conflict with npx versions.
fix
Use npx react-esbuild@latest [project-name] to ensure latest version without global install.
affects: >=2.0
Errors
Common errors & fixes
bun: command not found
Bun not installed or not in PATH.
fix
Install bun via powershell -c 'irm bun.sh/install.ps1 | iex' (Windows) or curl -fsSL https://bun.sh/install | bash (macOS/Linux).
Error: Cannot find module 'react-esbuild'
Running the command without installing the package or using npx correctly.
fix
Run npx react-esbuild@latest [my-app] instead of node react-esbuild.
unsupported Node.js version
Node.js version lower than 16.
fix
Upgrade Node.js to version 16 or later.
Upgrade
Version history
3.4.9latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
react-esbuild — npm install react-esbuild · libregistry