esbuild-node-builtins is a plugin for esbuild that provides polyfilled Node.js built-in modules (e.g., 'fs', 'path', 'crypto') for browser or other non-Node environments. Version 0.1.0 is the initial stable release, with no further updates or release cadence documented. It wraps browserify's 'node-libs-browser' to polyfill core modules, enabling bundling of Node-centric code for the browser with esbuild. Unlike esbuild's native 'platform: node', this plugin actually inlines polyfills; it is a simple integration but has no active maintenance and may be superseded by esbuild's own node polyfills or other plugins like 'esbuild-plugin-polyfill-node'.
npm install esbuild-node-builtinsNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to require and use the nodeBuiltIns plugin in an esbuild build script for browser bundling.
Switch to 'esbuild-plugin-polyfill-node' (npm) or use esbuild's native handling by setting platform: 'node'.
Use require() or dynamic import() with .mjs extension / type: module? Not recommended.
Test your code thoroughly; consider contributing to node-libs-browser or using a more comprehensive polyfill.
Run 'npm install esbuild-node-builtins' or 'yarn add esbuild-node-builtins'
Use 'const { nodeBuiltIns } = require("esbuild-node-builtins")' (note curly braces)Add nodeBuiltIns() to the plugins array and ensure esbuild is configured with platform: 'browser'