Postinstall plugin that bundles and minifies JavaScript and CSS files using esbuild. Version 0.15.5, actively maintained. Supports inputs as Buffers, remote URLs, or local paths, and concatenates bundles on output. Differentiates by integrating with the postinstall system and offering options for browserslist-based minification and source maps.
npm install postinstall-esbuildNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Bundles local and remote JS files, outputs minified bundle with sourcemap.
Expect CSS source maps to be inaccurate. Disable sourceMap for CSS if accuracy is needed.
Set sourceMap: false when passing Buffer objects in inputs.
Use ESM import instead of require.
Replace const { postinstallEsbuild } = require('postinstall-esbuild') with const postinstallEsbuild = require('postinstall-esbuild').Ensure each input is an object with path (string) and content (Buffer/string) or a string URL.
Run npm install esbuild --save-dev