Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Depth level support. #8

Open
JDBS opened this issue Aug 10, 2018 · 0 comments
Open

Depth level support. #8

JDBS opened this issue Aug 10, 2018 · 0 comments

Comments

@JDBS
Copy link

JDBS commented Aug 10, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant