Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lore/webpack-requiredir
https://github.com/lore/webpack-requiredir
Last synced: 1 day ago
JSON representation
- Host: GitHub
- URL: https://github.com/lore/webpack-requiredir
- Owner: lore
- License: mit
- Created: 2015-11-28T02:40:35.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2016-06-26T01:51:15.000Z (over 8 years ago)
- Last Synced: 2025-01-03T17:05:47.622Z (8 days ago)
- Language: JavaScript
- Size: 9.77 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
webpack-requiredir
===
Recursively require a modules based on a webpack require context.##Usage:
```
const requireDir = require('webpack-requiredir');
const result = requireDir(require.context('./src/actions', true, /\.js$/))# result will be a hash containing modules by name.
```##Options:
```
objectToModify - if given then results will be appended to this object
``````
exclude - array of modules names. if in this list they are excluded from the require.
``````
functionToApply - if provided a function that will be ran on every module included.
```