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-pluginVerified import paths — ran on the pinned version, not inferred.
Shows typical webpack config using the plugin to glob for entry files, ignore tests, and enable watch mode.
Upgrade to Node.js >=18 or continue using v2.x if you need older Node support.
Use webpack 5 and Node >=18.
For rename detection, ensure you are using webpack's watch mode and the plugin is instantiated.
Upgrade to webpack 5 if still on webpack 4 and using v3+.
Use require() or configure your bundler to handle CommonJS modules.
Install the package: npm install --save-dev webpack-watched-glob-entries-plugin. If using ESM, use createRequire or dynamic import.
Use WebpackWatchedGlobEntries.getEntries (static method), not new WebpackWatchedGlobEntries().getEntries.
Ensure only one instance of new WebpackWatchedGlobEntries() is in the plugins array.
Pass an array with at least one glob string to getEntries().