{"id":21966,"library":"rollup-plugin-copy-watch","title":"rollup-plugin-copy-watch","description":"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.","status":"active","version":"0.0.1","language":"javascript","source_language":"en","source_url":"https://github.com/rixo/rollup-plugin-copy-watch","tags":["javascript","rollup","rollup-plugin","copy","cp","asset","assets","file","files","typescript"],"install":[{"cmd":"npm install rollup-plugin-copy-watch","lang":"bash","label":"npm"},{"cmd":"yarn add rollup-plugin-copy-watch","lang":"bash","label":"yarn"},{"cmd":"pnpm add rollup-plugin-copy-watch","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"inherit configuration options and logic","package":"rollup-plugin-copy","optional":false},{"reason":"used for watching additional sources","package":"chokidar","optional":false}],"imports":[{"note":"ESM default export; CJS require not supported by Rollup plugins","wrong":"const copy = require('rollup-plugin-copy-watch')","symbol":"default","correct":"import copy from 'rollup-plugin-copy-watch'"},{"note":"Named export not available; use default import","wrong":"import { copy } from 'rollup-plugin-copy-watch'","symbol":"copy","correct":"import copy from 'rollup-plugin-copy-watch'"},{"note":"TypeScript types are shipped; use named type import for options","wrong":"import { Options } from 'rollup-plugin-copy-watch'","symbol":"copy (type)","correct":"import type { RollupPluginCopyWatchOptions } from 'rollup-plugin-copy-watch'"}],"quickstart":{"code":"import copy from 'rollup-plugin-copy-watch';\n\nexport default {\n  input: 'src/index.js',\n  output: { file: 'dist/app.js', format: 'cjs' },\n  plugins: [\n    copy({\n      watch: 'static',\n      targets: [\n        { src: 'src/index.html', dest: 'dist/public' },\n        { src: ['assets/images/**/*'], dest: 'dist/public/images' }\n      ]\n    })\n  ]\n};","lang":"typescript","description":"Rollup config that copies HTML and images with watch on static folder."},"warnings":[{"fix":"Add `watch: 'your/path'` to the options object.","message":"The 'watch' option must be explicitly set to enable source file watching; default is null (no watch).","severity":"breaking","affected_versions":">=0.0.1"},{"fix":"Switch to rollup-plugin-copy if watch is not needed.","message":"This package is a low-activity fork; prefer rollup-plugin-copy for production unless watch functionality is required.","severity":"deprecated","affected_versions":">=0.0.1"},{"fix":"Use rollup-plugin-copy with a separate watcher if full Chokidar control is needed.","message":"Chokidar options are not exposed; only 'watch' is passed to chokidar.watch().","severity":"gotcha","affected_versions":">=0.0.1"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Run `npm install chokidar --save-dev`.","cause":"chokidar is not listed as a peer dependency and may not be installed automatically.","error":"Error: Cannot find module 'chokidar'"},{"fix":"Use `import copy from 'rollup-plugin-copy-watch'`.","cause":"Using named import { copy } instead of default import.","error":"TypeError: copy is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}