Registry / devops / webpack-entries

webpack-entries

JSON →
library1.0.0jsnpmunverified

Utility to generate webpack entry points from glob patterns. Current stable version is 1.0.0, released with low frequency. Converts glob matches into arrays or objects (keyed by file name or relative path) suitable for webpack's entry configuration. No dependencies. Lightweight alternative to manual entry definition.

npm install webpack-entries
INSTALL
IMPORT
SIG · WEBPACK-ENTRIES
W
webpack-entries
devopsjavascriptv1.0.0
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.

default
var entries = require('webpack-entries');
import entries from 'webpack-entries';
Package uses CommonJS; no ESM or TypeScript typings provided.
entries function
entries('./src/js/*.js', true);
entries('./src/js/*.js'); // omitting second argument returns array, not object
Second boolean parameter controls output format: false (default) returns array, true returns object.
object with nested keys
entries('./src/**/*.js', true);
entries('./src/**/*.js', false); // returns flat array, losing directory structure
When multiple is true and pattern includes **, keys include relative paths (e.g., 'js/a').

Shows how to require webpack-entries and use it in a webpack config to generate entry points from a glob pattern, producing an object with file name keys.

var entries = require('webpack-entries'); var path = require('path'); module.exports = { entry: entries('./src/js/*.js', true), output: { filename: '[name].bundle.js', path: path.resolve(__dirname, 'dist') } };
Debug
Known issues
gotchaFile names without extension are used as keys (e.g., 'a' from 'a.js'); duplicates overwrite previous entries.
fix
Ensure glob pattern yields unique base file names or use nested patterns with /**/ to include path in keys.
affects: >=1.0.0
gotchaThe function throws synchronously if glob pattern matches no files; no graceful error handling.
fix
Wrap call in try-catch or ensure pattern matches at least one file.
affects: >=1.0.0
gotchaOnly supports CommonJS require; no ES module or TypeScript support.
fix
Use dynamic import or CommonJS require in an ES module context: const entries = await import('webpack-entries').then(m => m.default);
affects: >=1.0.0
Errors
Common errors & fixes
Cannot find module 'webpack-entries'
Package not installed or installed as --save-dev not --save
fix
Run: npm install webpack-entries --save-dev
entries is not a function
Incorrect import style (e.g., import entries from 'webpack-entries' in ESM context)
fix
Use const entries = require('webpack-entries'); or const { default: entries } = await import('webpack-entries');
Upgrade
Version history
1.0.0latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
8 hits · last 30 days
node
8
Resources
webpack-entries — npm install webpack-entries · libregistry