An ESBuild plugin that displays filesize information for output bundles after build. Current stable version is 0.4.0. The plugin integrates seamlessly with ESBuild and shows file sizes in kilobytes with color-coded output. It is part of the LinbuduLab nx-plugins ecosystem. Unlike other filesize plugins, this one is specifically tailored for ESBuild's plugin API and provides immediate visual feedback in the console. Releases follow semantic versioning but the package is maintained as part of a monorepo with occasional updates.
npm install esbuild-plugin-filesizeVerified import paths — ran on the pinned version, not inferred.
Basic setup of esbuild-plugin-filesize in an ESBuild build script with default options.
Use filesizePlugin() with parentheses.
Set showGzipped: false to revert to old behavior.
Ensure 'write' is true or use a different method to get file sizes.
Run npm install esbuild-plugin-filesize --save-dev
Use: import filesizePlugin from 'esbuild-plugin-filesize'