{"id":20769,"library":"webpack-glob-entry","title":"webpack-glob-entry","description":"A utility function for webpack that converts glob patterns into entry objects, allowing multiple entry points to be specified via globs. Current stable version is 2.1.1, with no updates since January 2017. It simplifies webpack configuration by automating entry point discovery, supporting custom entry name functions and base path extraction. Unlike manual entry arrays or other glob plugins, it integrates directly into the entry field and provides helper functions for path manipulation. However, it has not been updated for webpack 4/5 and may have compatibility issues.","status":"maintenance","version":"2.1.1","language":"javascript","source_language":"en","source_url":"https://github.com/thecotne/webpack-glob-entry","tags":["javascript","webpack"],"install":[{"cmd":"npm install webpack-glob-entry","lang":"bash","label":"npm"},{"cmd":"yarn add webpack-glob-entry","lang":"bash","label":"yarn"},{"cmd":"pnpm add webpack-glob-entry","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Package is CommonJS-only; no ES module support.","wrong":"import entry from 'webpack-glob-entry'","symbol":"entry","correct":"const entry = require('webpack-glob-entry')"},{"note":"basePath is a static method on the entry function, not a separate export.","wrong":"const basePath = require('webpack-glob-entry').basePath","symbol":"entry.basePath","correct":"const entry = require('webpack-glob-entry').basePath"},{"note":"The module exports a single function directly; destructuring will yield undefined.","wrong":"const { entry } = require('webpack-glob-entry')","symbol":"entry (default)","correct":"const entry = require('webpack-glob-entry')"}],"quickstart":{"code":"const entry = require('webpack-glob-entry');\nconst path = require('path');\nmodule.exports = {\n  entry: entry('js/*.entry.js'), // converts to { 'js/some': './js/some.entry.js' }\n  output: {\n    path: path.resolve(__dirname, 'public/build'),\n    filename: '[name].bundle.js'\n  }\n};","lang":"javascript","description":"Uses webpack-glob-entry to generate a webpack entry object from a glob pattern, showing basic usage with a single glob."},"warnings":[{"fix":"Update custom entry name functions to accept a single argument; remove the unused index parameter.","message":"In v2.0.0, entryNameFn now takes only one parameter (file path), not the previous two (file path and index).","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Test with your webpack version; consider alternatives like 'glob' with manual entry mapping.","message":"Package has not been updated since 2017; it may not be compatible with webpack 4 or 5 (e.g., entry object expectations).","severity":"gotcha","affected_versions":">=2.0.0"},{"fix":"Use spread: entry(...globArray) or call entry with multiple string arguments.","message":"The entry function expects glob patterns as separate arguments, not an array. Passing an array will cause incorrect behavior.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Use const entry = require('webpack-glob-entry')","cause":"Using ES import syntax with this CommonJS-only module.","error":"entry is not a function"},{"fix":"Run npm install webpack-glob-entry --save-dev","cause":"Package not installed or incorrect module path.","error":"Cannot find module 'webpack-glob-entry'"},{"fix":"Use const entry = require('webpack-glob-entry') without destructuring.","cause":"Using destructured import on the default export.","error":"TypeError: Cannot destructure property 'entry' of ... undefined"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}