{"id":22284,"library":"rollup-plugin-watch-external","title":"rollup-plugin-watch-external","description":"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.","status":"active","version":"1.0.2","language":"javascript","source_language":"en","source_url":"https://github.com/arpitchakladar/rollup-plugin-watch-external","tags":["javascript"],"install":[{"cmd":"npm install rollup-plugin-watch-external","lang":"bash","label":"npm"},{"cmd":"yarn add rollup-plugin-watch-external","lang":"bash","label":"yarn"},{"cmd":"pnpm add rollup-plugin-watch-external","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency – plugin requires Rollup >=2.39.0","package":"rollup","optional":true}],"imports":[{"note":"This package exports a named function, not a default export.","wrong":"import watchExternal from 'rollup-plugin-watch-external'","symbol":"watchExternal","correct":"import { watchExternal } from 'rollup-plugin-watch-external'"},{"note":"CommonJS require should use destructuring to get the named export.","wrong":"const watchExternal = require('rollup-plugin-watch-external')","symbol":"watchExternal","correct":"const { watchExternal } = require('rollup-plugin-watch-external')"},{"note":"Do not use namespace import; the module only has a named export.","wrong":"import * as watchExternal from 'rollup-plugin-watch-external'","symbol":"watchExternal","correct":"import { watchExternal } from 'rollup-plugin-watch-external'"}],"quickstart":{"code":"// rollup.config.js\nimport { watchExternal } from 'rollup-plugin-watch-external';\n\nexport default {\n  input: 'src/index.js',\n  output: {\n    file: 'dist/bundle.js',\n    format: 'iife'\n  },\n  plugins: [\n    watchExternal({\n      entries: ['public/**.js', 'data/*.json']\n    })\n  ]\n};","lang":"javascript","description":"Shows basic setup with named import, glob patterns for JS and JSON files in watch list."},"warnings":[{"fix":"Upgrade Rollup to at least 2.39.0 or use a different watch plugin.","message":"Package requires Rollup ^2.39.0; incompatible with Rollup 1.x or early 2.x releases.","severity":"breaking","affected_versions":"rollup <2.39.0"},{"fix":"Test your glob patterns (e.g., with `glob` package) before adding to plugin options.","message":"The `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.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"search_vec":"'1.0.2':21 '2.39.0':24 'add':9 'addit':10 'altern':53 'api':26 'array':30 'asset':13 'chang':43 'chokidar':58 'config':14 'consid':54 'custom':57 'e.g':12 'entri':29 'extern':5 'featur':51 'feature-rich':50 'file':11,46 'glob':32 'handl':36 'increment':37 'integr':59 'javascript':60 'list':19 'minim':25 'one':27 'option':28 'pattern':33 'plugin':3,7 'rebuild':38,41 'requir':22 'rich':52 'rollup':2,6,16,23 'rollup-plugin-watch-extern':1 'rollup/plugin-watch':55 'simpli':39 'specifi':45 'trigger':40 'version':20 'watch':4,18","created_at":"2026-04-27T17:04:21.579171+00:00","updated_at":"2026-04-27T17:04:21.579171+00:00","problems":[{"fix":"Run `npm install rollup-plugin-watch-external --save-dev` or `yarn add -D rollup-plugin-watch-external`.","cause":"Package not installed or not in node_modules.","error":"Error: Cannot find module 'rollup-plugin-watch-external'"},{"fix":"Change to `import { watchExternal } from 'rollup-plugin-watch-external'`.","cause":"Using default import instead of named import.","error":"TypeError: watchExternal is not a function"},{"fix":"Update Rollup: `npm install rollup@latest --save-dev`.","cause":"Installed Rollup version is too old.","error":"Error: Rollup version mismatch: expected >=2.39.0, got 2.20.0"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/arpitchakladar/rollup-plugin-watch-external","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/rollup-plugin-watch-external","openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-18","next_check":"2026-07-26","install_tag":null}}