An esbuild plugin that automatically formats processed files with Prettier. Version 1.0.0 is the initial release. It runs Prettier on each file that matches the filter regex (default: /[jt]sx?|s?css/) and writes changes back. This plugin is useful in watch mode to keep code formatted without manual intervention. It is lightweight and configurable, but note that Prettier rewriting may conflict with esbuild's incremental build caching.
npm install esbuild-plugin-prettierNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates using the plugin in an esbuild build with custom filter and Prettier options.
Consider disabling the plugin for production builds or using onEnd instead of onLoad.
Use prettier's asynchronous API if performance is critical; consider an alternative plugin.
Set filter to only include file types you have prettier plugins installed for.
Run: npm install prettier
Use prettier v2 or configure the plugin to work with prettier v3 (requires plugin update)
Specify a custom filter that matches your file extensions