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
I have a big project where i need to import some files with some extensions. Something like that:
-src
* DirA
* DirAA
* FileToGet.ext
* DirBB
* AlotOfFilesAndDirectoriesThatIDontWantToLoad (such as node_modules)
* DirB
*DirBB
....
So, when i do require.ensure('./src', true, /ext$/) it gets the right file. The problem is that it becomes too slow because this require is maping all folders structures.
However you can set false if you dont want to look in subdirectories, but i need to search inside level 1 subdirectories. ¿Maybe could be 2nd parameter a number indicating depth instead of a boolean?. 0 stills being false and other numbers still being true.
The text was updated successfully, but these errors were encountered:
I have a big project where i need to import some files with some extensions. Something like that:
So, when i do
require.ensure('./src', true, /ext$/)
it gets the right file. The problem is that it becomes too slow because this require is maping all folders structures.However you can set false if you dont want to look in subdirectories, but i need to search inside level 1 subdirectories. ¿Maybe could be 2nd parameter a number indicating depth instead of a boolean?. 0 stills being false and other numbers still being true.
The text was updated successfully, but these errors were encountered: