Registry /
devops / rollup-plugin-watch-external
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.
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']
})
]
};
Errors
Common errors & fixes
Error: Cannot find module 'rollup-plugin-watch-external'
Package not installed or not in node_modules.
fixRun `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.
fixChange 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.
fixUpdate Rollup: `npm install rollup@latest --save-dev`.
Audit
Dependencies
rollupoptionalPeer dependency – plugin requires Rollup >=2.39.0