esbuild plugin to merge multiple JSON sources (glob patterns or inline objects) into a single output file during the build process. Version 0.1.0 is stable with no recent updates; it uses deep merging via Object.assign by default and supports custom merge functions. Differentiators: seamless integration with esbuild's pipeline, supports globs and inline objects, optional custom merge logic. Ships TypeScript types with MIT license. Ideal for bundling manifest files or configuration JSONs.
npm install esbuild-plugin-json-mergeNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Compiles an esbuild build that merges a file and inline object into a single JSON output.
Provide a custom merge function, e.g., using default-composer or lodash.merge.
Test glob patterns with glob package directly if issues arise.
Use dynamic import() in Node <12, or configure bundler for CommonJS.
Set outfile relative to outdir, or adjust esbuild's working directory.
Monitor releases for updates.
Run 'npm install esbuild-plugin-json-merge --save-dev'.
Use 'const jsonMerge = require('esbuild-plugin-json-merge').default' or switch to ESM import.Ensure entryPoints is an array of strings/objects and outfile is a string.