Answer the question
In order to leave comments, you need to log in
How to import modules automatically after webpack build?
Hello.
Now the project has a need to load some modules automatically after assembly (using dynamic import
). The problem is that after the assembly by Webpack, there is only one file left, inside which all the sources are packed. Earlier I tried to use Babel for assembly, it saves the structure, there were no problems there, but it was decided to switch to Webpack. The modules themselves are resolved using the usual `readdir`, and then driven into Promise.all(paths.map(path => import(path))
, which does not work with webpack.
Is it possible to implement this now? Grateful for any help and advice
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question