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–226 runs
build_error
glibcnode 18–226 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
Errors
Common errors & fixes
Error: Cannot find module 'webpack'
webpack is not installed as a peer dependency.
fixnpm install webpack --save-dev
TypeError: WebpackGlob is not a constructor
Using ES6 import incorrectly, or destructuring the require result.
fixUse const WebpackGlob = require('webpack-glob'); Audit
Dependencies
webpackrequiredPeer dependency for compilation
minimatchrequiredUsed internally for glob pattern matching