Registry / devops / rollup-plugin-copy-watch

rollup-plugin-copy-watch

JSON →
library0.0.1jsnpmunverified

A fork of rollup-plugin-copy (v3.4.0) that adds a `watch` option to watch additional sources (e.g., static assets) outside Rollup's bundle graph, triggering copy on change. Version 0.0.1 is the only release (unstable). It uses Chokidar for file watching and supports glob patterns, multiple targets, and flatten/hash options. Less maintained than the original; use for watch-mode copy only, else prefer rollup-plugin-copy.

npm install rollup-plugin-copy-watch
INSTALL
IMPORT
SIG · ROLLUP-PLUGIN-COPY
R
rollup-plugin-copy-watch
devopsjavascriptv0.0.1
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
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
musl
node 18223 runs
build_error
glibc
node 18223 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' } ] }) ] };
Debug
Known issues
breakingThe 'watch' option must be explicitly set to enable source file watching; default is null (no watch).
fix
Add `watch: 'your/path'` to the options object.
affects: >=0.0.1
deprecatedThis package is a low-activity fork; prefer rollup-plugin-copy for production unless watch functionality is required.
fix
Switch to rollup-plugin-copy if watch is not needed.
affects: >=0.0.1
gotchaChokidar options are not exposed; only 'watch' is passed to chokidar.watch().
fix
Use rollup-plugin-copy with a separate watcher if full Chokidar control is needed.
affects: >=0.0.1
Errors
Common errors & fixes
Error: Cannot find module 'chokidar'
chokidar is not listed as a peer dependency and may not be installed automatically.
fix
Run `npm install chokidar --save-dev`.
TypeError: copy is not a function
Using named import { copy } instead of default import.
fix
Use `import copy from 'rollup-plugin-copy-watch'`.
Upgrade
Version history
0.0.1latest on npm
Audit
Dependencies
rollup-plugin-copyrequiredinherit configuration options and logic
chokidarrequiredused for watching additional sources
Agent activity
6 hits · last 30 days
node
5
Resources
rollup-plugin-copy-watch — npm install rollup-plugin-copy-watch · libregistry