A Rollup plugin to merge multiple JSON files into a single JSON output during the build process. Current stable version is 0.2.1, with no recent updates and a small scope. It supports recursive merging, watching for changes, and optional pretty-printing. Unlike general-purpose merge tools, it integrates directly into Rollup's plugin system. Use with caution due to infrequent maintenance.
npm install rollup-plugin-mergeVerified import paths — ran on the pinned version, not inferred.
Example of merging two JSON files into a single output during Rollup build with recursive merge and prettification.
Use 'recursive' instead of 'recurisve' in the options object.
Consider alternatives like @rollup/plugin-json or manual merging.
Ensure your project is configured for ESM imports.
Set 'watch: true' only if you want initial copy; use Rollup's watch mode for rebuilds.
Use import instead: import merge from 'rollup-plugin-merge'
Use default import: import merge from 'rollup-plugin-merge'
Run npm install rollup-plugin-merge --save-dev