Utility to merge multiple Rollup configuration objects with support for custom array and object merging strategies. Current stable version: 0.0.12 (released 2019). Low release cadence (no updates since 2019). Key differentiator: provides array concatenation and object merging specifically tailored for Rollup configs, with optional customizer functions to override default behavior for specific keys. Unlike generic merge libraries (e.g., lodash.merge), it handles Rollup's plugin arrays and nested config structures by default.
npm install rollup-merge-configVerified import paths — ran on the pinned version, not inferred.
Shows basic merging of multiple Rollup config objects with default array concatenation and later-key override.
Use a custom arrayCustomizer to deduplicate, e.g., arrayCustomizer: (a, b, key) => key === 'plugins' ? [...new Set([...a, ...b])] : undefined
Ensure no config sets a property to undefined if you want it removed; use null instead.
If you need to merge non-plain objects, implement a custom objectCustomizer.
Consider using @rollup/pluginutils mergeOptions or manually merging configs.
Use import { merge } from 'rollup-merge-config' instead of const merge = require('rollup-merge-config').mergeUse merge(config1, config2) or merge(...arrayOfConfigs) with spread, not merge(arrayOfConfigs).
No dependency data recorded yet.