Registry / devops / webpack-glob

webpack-glob

JSON →
library2.0.2jsnpmunverified

A tool that combines webpack with glob patterns, allowing you to specify multiple webpack configuration files using minimatch/wildcard patterns. Version 2.0.2 is the latest stable release, though development has been sparse since 2016. It provides both CLI and programmatic (Node.js) APIs for compiling glob-matched webpack configs. Differentiates itself by enabling multi-config webpack setups without manual file listing.

npm install webpack-glob
INSTALL
IMPORT
SIG · WEBPACK-GLOB
W
webpack-glob
devopsjavascriptv2.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 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

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

WebpackGlob
var WebpackGlob = require('webpack-glob');
import WebpackGlob from 'webpack-glob';
Package uses CommonJS; no ESM export provided.
WebpackGlob
import WebpackGlob = require('webpack-glob');
import * as WebpackGlob from 'webpack-glob';
TypeScript with esModuleInterop: use import = require.
default export
const WebpackGlob = require('webpack-glob');
const { WebpackGlob } = require('webpack-glob');
The only export is the constructor itself, not a named member.

Creates a WebpackGlob instance with default options and compiles all webpack config files matching the glob pattern.

var WebpackGlob = require('webpack-glob'); var webpackOptions = { output: { path: './dist' }, stats: { colors: true } }; var compilerOptions = { progress: true, json: false, memoryFs: false }; var webpack = new WebpackGlob(compilerOptions, webpackOptions); webpack.run('./src/**/webpack.config.js').then(function() { console.log('done'); }).catch(function(err) { console.error(err); });
webpack-glob --version
Debug
Known issues
gotchaThe package only supports CommonJS; ES module imports will fail. Use require() or configure bundler for CommonJS interop.
fix
Switch to require() or use bundler transform for CommonJS.
affects: >=2.0.0
deprecatedThe closestWatch option was removed in v2.0.0 and no longer works.
fix
Use watch mode via compilerOptions.watch instead.
affects: >=2.0.0
gotchaIf no matching config files are found, webpack-glob may hang or not error. Ensure glob pattern is correct.
fix
Verify glob pattern. Use --config with quotes in CLI or escape properly.
affects: >=1.0.0
Errors
Common errors & fixes
Error: Cannot find module 'webpack'
webpack is not installed as a peer dependency.
fix
npm install webpack --save-dev
TypeError: WebpackGlob is not a constructor
Using ES6 import incorrectly, or destructuring the require result.
fix
Use const WebpackGlob = require('webpack-glob');
Upgrade
Version history
2.0.2latest on npm
Audit
Dependencies
webpackrequiredPeer dependency for compilation
minimatchrequiredUsed internally for glob pattern matching
Agent activity
8 hits · last 30 days
node
8
Resources
webpack-glob — npm install webpack-glob · libregistry