A Rollup plugin that copies files and folders with glob support and adds file merging capability on top of rollup-plugin-copy. Current version 1.0.3, stable, maintained. Key differentiator: allows merging multiple source files into a single destination file via the 'file' target property, unlike its predecessor. Requires Node >=14, ships TypeScript types, and relies on fs-extra, globby, and colorette as peer dependencies.
npm install rollup-plugin-copy-mergeVerified import paths — ran on the pinned version, not inferred.
Shows basic plugin usage in rollup.config.js, including copying single files, merging globs into a single file, and using glob patterns.
Update Rollup to v2+ or use an older version of the plugin.
Use 'file' only for text files; for binary assets, use 'dest' instead.
Set flatten: true (default) to ignore src directory structure.
Provide a function as rename: (name, ext, srcPath) => ...
Ensure Node >=14 as specified in engine requirement.
Run: npm install rollup-plugin-copy-merge --save-dev
Change to: const copy = require('rollup-plugin-copy-merge').defaultCheck src paths and ensure files exist; use absolute paths or adjust relative to project root.