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 need to dynamically require a module.
In webpack I did it via require.ensure, but this is not working.
Case:
I am getting data from the server and have to map these to a ts classes and create an object tree.
The data can be nested infinitely, so I have to load the module dynamic depending on a type attached to the data.
@TheLarkInn can you give some assistance as to how to dynamically require modules in webpack2? I believe it's just doing System.import but some typings might be needed as well.
Activity
filipesilva commentedon Nov 21, 2016
@TheLarkInn can you give some assistance as to how to dynamically require modules in webpack2? I believe it's just doing
System.importbut some typings might be needed as well.NilsQuirmbach commentedon Nov 22, 2016
I tried it with
System.import, but it fails the same as it does withrequire.NilsQuirmbach commentedon Nov 28, 2016
I made a small example to make it more clear, what I am trying to archive.
https://github.com/NilsQuirmbach/dynamic-require
angular-automatic-lock-bot commentedon Sep 6, 2019
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.