Registry /
devops / rollup-plugin-copy-watch
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslnode 18–223 runs
build_error
glibcnode 18–223 runs
build_error
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
default
✓ import copy from 'rollup-plugin-copy-watch'
✗ const copy = require('rollup-plugin-copy-watch')
ESM default export; CJS require not supported by Rollup plugins
copy
✓ import copy from 'rollup-plugin-copy-watch'
✗ import { copy } from 'rollup-plugin-copy-watch'
Named export not available; use default import
copy (type)
✓ import type { RollupPluginCopyWatchOptions } from 'rollup-plugin-copy-watch'
✗ import { Options } from 'rollup-plugin-copy-watch'
TypeScript types are shipped; use named type import for options
Rollup config that copies HTML and images with watch on static folder.
import copy from 'rollup-plugin-copy-watch';
export default {
input: 'src/index.js',
output: { file: 'dist/app.js', format: 'cjs' },
plugins: [
copy({
watch: 'static',
targets: [
{ src: 'src/index.html', dest: 'dist/public' },
{ src: ['assets/images/**/*'], dest: 'dist/public/images' }
]
})
]
};
Errors
Common errors & fixes
Error: Cannot find module 'chokidar'
chokidar is not listed as a peer dependency and may not be installed automatically.
fixRun `npm install chokidar --save-dev`.
TypeError: copy is not a function
Using named import { copy } instead of default import.
fixUse `import copy from 'rollup-plugin-copy-watch'`.
Audit
Dependencies
rollup-plugin-copyrequiredinherit configuration options and logic
chokidarrequiredused for watching additional sources