This library provides a simple function to recursively require all modules from a webpack require.context, returning a hash of modules keyed by their names. Version 0.2.1 is the latest. It supports optional object modification, exclusion of specific modules, and applying a transformation function to each module. It is a minimal utility for use with webpack's require.context, primarily in Node.js or webpack-bundled applications. No active development; last updated in 2016.
npm install webpack-requiredirVerified import paths — ran on the pinned version, not inferred.
Shows how to require all .js files from ./src/components recursively, excluding index.js, and extracting default exports.
Replace with manual import() calls or webpack's require.context directly with custom logic.
Ensure code is bundled with webpack; use only where require.context is available.
Map keys as needed (e.g., strip extensions and leading './').
Run: npm install webpack-requiredir
Ensure the code is part of a webpack bundle, or use a polyfill for require.context.
Use require() instead of import, or configure your bundler to handle CommonJS.
No dependency data recorded yet.