A dead-simple Rollup plugin (v1.0.1, last updated 2022) that adds non-JS assets like HTML and CSS to Rollup's file watcher. Useful alongside copy plugins to trigger rebuilds when static files change. Accepts an array of filenames or globs. Lightweight alternative to manual watcher configuration or complex tooling. No dependencies beyond Rollup.
npm install rollup-plugin-watch-assetsVerified import paths — ran on the pinned version, not inferred.
Basic setup: import plugin, add to plugins array, specify asset paths/globs to watch.
Ensure Rollup runs in watch mode (--watch flag). Also verify glob patterns match existing files.
Use absolute paths or resolve from project root: `path.resolve('src/...')`.Check compatibility; upgrade may require plugin rewrite.
Use `import watchAssets from 'rollup-plugin-watch-assets'` (no curly braces).
Run `npm install rollup-plugin-watch-assets --save-dev`
Verify `assets` array contains valid globs (e.g., 'src/**/*.html') and files exist. Run rollup with --watch.
No dependency data recorded yet.