Registry / devops / webpack-watched-glob-entries-plugin

webpack-watched-glob-entries-plugin

JSON →
library3.2.0jsnpmunverified

Webpack plugin (v3.2.0) that allows you to use glob patterns to define entry points and automatically watches those glob matches for changes during development. It integrates with webpack's watch mode so that adding or removing files matching the glob triggers a rebuild without manual configuration. Supports multiple glob patterns, custom glob options like ignore patterns, and preserves directory structure in output names. Requires Node >=18 and webpack 5. Unlike manual entry arrays, this plugin dynamically updates entries as files change, making it ideal for projects with many entry points or those that frequently add/remove source files. Released relatively infrequently, with maintenance focused on dependency updates and Node version support.

npm install webpack-watched-glob-entries-plugin
INSTALL
IMPORT
SIG · WEBPACK-WATCHED-GL
W
webpack-watched-glob-entries-plugin
devopsjavascriptv3.2.0
Install
—
Import
—
Disk
—
Pass rate
0/ 6
Env Coverage0 / 6
glibc
18–22
musl
18–22
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 18–223 runs
build_error
glibc
node 18–223 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

WebpackWatchedGlobEntries
✓ const WebpackWatchedGlobEntries = require('webpack-watched-glob-entries-plugin');
✗ import WebpackWatchedGlobEntries from 'webpack-watched-glob-entries-plugin';
Package does not export ESM; use CommonJS require. For TypeScript, use `import WebpackWatchedGlobEntries = require('...')` or `const WebpackWatchedGlobEntries = require('...')`.
getEntries
✓ WebpackWatchedGlobEntries.getEntries(globs, options)
✗ new WebpackWatchedGlobEntries().getEntries()
getEntries is a static method on the class, not an instance method.
WebpackWatchedGlobEntries (as plugin)
✓ plugins: [new WebpackWatchedGlobEntries()]
✗ plugins: [WebpackWatchedGlobEntries]
Must instantiate with `new` before adding to plugins array.

Shows typical webpack config using the plugin to glob for entry files, ignore tests, and enable watch mode.

// webpack.config.js const path = require('path'); const WebpackWatchedGlobEntries = require('webpack-watched-glob-entries-plugin'); module.exports = { entry: WebpackWatchedGlobEntries.getEntries( [ path.resolve(__dirname, 'src/entries/**/*.js'), path.resolve(__dirname, 'src/pages/**/*.js') ], { ignore: '**/*.test.js' } ), output: { path: path.resolve(__dirname, 'dist'), filename: '[name].js' }, plugins: [ new WebpackWatchedGlobEntries() ], mode: 'development' };
Debug
Known issues
breakingDropped support for Node.js <18 in v3.0.0. Older versions (2.x) support Node 10 and 12.
fix
Upgrade to Node.js >=18 or continue using v2.x if you need older Node support.
affects: >=3.0.0
breakingv3.0.0 dropped support for Node 12 and added support for Node 20 and 21. Requires webpack 5.
fix
Use webpack 5 and Node >=18.
affects: >=3.0.0
gotchaThe getEntries method uses glob.sync() under the hood, so changes to the filesystem (addition/removal of files) will be detected during watch mode, but not if a file is renamed (unless you add/remove).
fix
For rename detection, ensure you are using webpack's watch mode and the plugin is instantiated.
affects: *
deprecatedUsing webpack 4 may be deprecated in future versions; current versions require webpack 5.
fix
Upgrade to webpack 5 if still on webpack 4 and using v3+.
affects: >=3.0.0
gotchaThe plugin does not support ESM imports. It is a CommonJS package only.
fix
Use require() or configure your bundler to handle CommonJS modules.
affects: *
Errors
Common errors & fixes
Cannot find module 'webpack-watched-glob-entries-plugin'
Package not installed or incorrectly imported in ESM project.
fix
Install the package: npm install --save-dev webpack-watched-glob-entries-plugin. If using ESM, use createRequire or dynamic import.
TypeError: WebpackWatchedGlobEntries.getEntries is not a function
Trying to call getEntries on an instance instead of the class.
fix
Use WebpackWatchedGlobEntries.getEntries (static method), not new WebpackWatchedGlobEntries().getEntries.
HookWebpackError: Plugin tried to register a hook that is already registered
Multiple instances of the plugin added to webpack config.
fix
Ensure only one instance of new WebpackWatchedGlobEntries() is in the plugins array.
Error: You must provide at least one glob pattern
Empty array passed to getEntries or no patterns provided.
fix
Pass an array with at least one glob string to getEntries().
Upgrade
Version history
3.2.0latest on npm
Audit
Dependencies
webpackrequiredpeer dependency required for the plugin to function
globrequiredused internally for file globbing
Agent activity
8 hits · last 30 days
node
8
Resources
webpack-watched-glob-entries-plugin — npm install webpack-watched-glob-entries-plugin · libregistry