Registry / devops / rollup-plugin-watch-external

rollup-plugin-watch-external

JSON →
library1.0.2jsnpmunverified

Rollup plugin to add additional files (e.g., assets, configs) to Rollup's watch list. Version 1.0.2 requires Rollup ^2.39.0. Minimal API: one option `entries` (array of glob patterns). Does not handle incremental rebuilds; simply triggers rebuild on changes to specified files. For a more feature-rich alternative, consider @rollup/plugin-watch or custom chokidar integration.

npm install rollup-plugin-watch-external
INSTALL
IMPORT
SIG · ROLLUP-PLUGIN-WATC
R
rollup-plugin-watch-external
devopsjavascriptv1.0.2
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.

watchExternal
import { watchExternal } from 'rollup-plugin-watch-external'
import watchExternal from 'rollup-plugin-watch-external'
This package exports a named function, not a default export.
watchExternal
const { watchExternal } = require('rollup-plugin-watch-external')
const watchExternal = require('rollup-plugin-watch-external')
CommonJS require should use destructuring to get the named export.
watchExternal
import { watchExternal } from 'rollup-plugin-watch-external'
import * as watchExternal from 'rollup-plugin-watch-external'
Do not use namespace import; the module only has a named export.

Shows basic setup with named import, glob patterns for JS and JSON files in watch list.

// rollup.config.js import { watchExternal } from 'rollup-plugin-watch-external'; export default { input: 'src/index.js', output: { file: 'dist/bundle.js', format: 'iife' }, plugins: [ watchExternal({ entries: ['public/**.js', 'data/*.json'] }) ] };
Debug
Known issues
breakingPackage requires Rollup ^2.39.0; incompatible with Rollup 1.x or early 2.x releases.
fix
Upgrade Rollup to at least 2.39.0 or use a different watch plugin.
affects: rollup <2.39.0
gotchaThe `entries` option uses glob patterns; if no files match, the plugin still adds the pattern but may not trigger builds. Ensure globs match existing files.
fix
Test your glob patterns (e.g., with `glob` package) before adding to plugin options.
affects: >=1.0.0
Errors
Common errors & fixes
Error: Cannot find module 'rollup-plugin-watch-external'
Package not installed or not in node_modules.
fix
Run `npm install rollup-plugin-watch-external --save-dev` or `yarn add -D rollup-plugin-watch-external`.
TypeError: watchExternal is not a function
Using default import instead of named import.
fix
Change to `import { watchExternal } from 'rollup-plugin-watch-external'`.
Error: Rollup version mismatch: expected >=2.39.0, got 2.20.0
Installed Rollup version is too old.
fix
Update Rollup: `npm install rollup@latest --save-dev`.
Upgrade
Version history
1.0.2latest on npm
Audit
Dependencies
rollupoptionalPeer dependency – plugin requires Rollup >=2.39.0
Agent activity
4 hits · last 30 days
node
4
Resources
rollup-plugin-watch-external — npm install rollup-plugin-watch-external · libregistry