1.0.4 • Published 2 years ago
@caracal7/esbuild-plugin-node-polyfills v1.0.4
ESBuild Plugin Node Polyfills
Provides NodeJS Polyfills similar to Webpack's "node" option
Usage
- Install Package (
npm install -D esbuild-plugin-node-polyfillsoryarn 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
buffercryptohttphttpsospathstreamzliburleventsprocessutil_stream_duplex_stream_passthrough_stream_readable_stream_transform_stream_writable
Modules which will be resolved to false
tlsassertfsnet