A Rollup plugin (v0.0.2, stable but minimal) that merges multiple JSON sources into one output file during bundle build. Supports glob patterns, inline objects, and custom merge functions. Lightweight alternative to manual JSON combination in Rollup pipelines. No major updates since initial release; less feature-rich than @rollup/plugin-json combined with manual merging but simpler for single-file concatenation.
npm install rollup-plugin-json-mergeVerified import paths — ran on the pinned version, not inferred.
Minimal Rollup config that merges two JSON files into one output using the plugin.
Provide custom merge function via options.merge to handle conflicts (e.g., deep merge).
Use path.resolve or ensure patterns are correct relative to working directory.
Validate input files exist before configuring plugin.
npm install glob --save-dev
Use default import: import merge from 'rollup-plugin-json-merge'
npm install rollup-plugin-json-merge --save-dev