An esbuild plugin that prepares package.json for publishing by removing unnecessary fields (e.g., scripts, devDependencies) and copying it to the output folder. Version 2.0.0 is the latest stable release, with active development. It is designed for developers who want to publish clean packages directly from esbuild builds. Differentiators include zero configuration defaults and support for custom output paths.
npm install esbuild-plugin-package-jsonNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates basic usage of the plugin with esbuild, configuring the lifecycle and output directory.
Use `import { packageJsonPlugin } from 'esbuild-plugin-package-json'` instead.Explicitly set `overrideOut` to your intended output directory.
Manually specify additional fields to remove in your own build script.
Use the default `onEnd` lifecycle to ensure the build is complete.
Run `npm install -D esbuild-plugin-package-json` to install it as a dev dependency.
Use `import { packageJsonPlugin } from 'esbuild-plugin-package-json'` instead of `import packageJsonPlugin from ...`.