@caracal7/esbuild-plugin-node-polyfills
v1.0.4
Published
Provides NodeJS Polyfills for ESBuild; similar to Webpack's "node" option.
Downloads
1
Readme
ESBuild Plugin Node Polyfills
Provides NodeJS Polyfills similar to Webpack's "node" option
Usage
- Install Package (
npm install -D esbuild-plugin-node-polyfills
oryarn add --dev esbuild-plugin-node-polyfills
) - Install the required mocks from the peer-dependencies
- Use in your ESBuild Script:
const ESBuildNodePolyfillsPlugin = require("esbuild-plugin-node-polyfills");
// Your ESBuild Config
const config = {
plugins: [ESBuildNodePolyfillsPlugin],
};
Modules with Polyfills
buffer
crypto
http
https
os
path
stream
zlib
url
events
process
util
_stream_duplex
_stream_passthrough
_stream_readable
_stream_transform
_stream_writable
Modules which will be resolved to false
tls
assert
fs
net