Open jnv opened 5 years ago
Though I wonder whether we could avoid these mappings completely or move them to a different layer? The biggest disadvantage with current solution is that you need to re-scan components directory on every Program
instatiation and in the end you are duplicating native require
functionality, though with some security measures. Perhaps this could be pulled out to some customisable component name mapper with a separate cache?
Instead of specyfing
componentsPath
as e.g.../components
I could say:to register all the components without their tests.
Use package such as fast-glob.
Bonus: Make it async.