You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Could we allow a maxDepth option for require.context to search for files, and perhaps an array of folders to search in?
If you set it to the root of your project it will end up running regexes against hundred of files, which is insanely slow.
My use case is a plugin system.
For my purposes, I have a /modules directory with lots of modules inside it. Each module has a config dir. E.g. /modules/foo/config/default.js. I want to collect all the files in the config dirs for each module, then merge them together to create a master config.
Also, could we allow absolute paths for directories?
The text was updated successfully, but these errors were encountered:
Could we allow a
maxDepth
option for require.context to search for files, and perhaps an array of folders to search in?If you set it to the root of your project it will end up running regexes against hundred of files, which is insanely slow.
My use case is a plugin system.
For my purposes, I have a
/modules
directory with lots of modules inside it. Each module has a config dir. E.g./modules/foo/config/default.js
. I want to collect all the files in the config dirs for each module, then merge them together to create a master config.Also, could we allow absolute paths for directories?
The text was updated successfully, but these errors were encountered: