I have an angular2 app structure with 4 sub-apps that require some common configurations.These sub-apps are independent of each other. I am using webpack for dynamic loading and code splitting. Each sub-apps will have their own js files once they will be converted from .ts files. I want to bundle js files respective to the loading of sub-apps by the browser client.
E.g.
App-1 ===> app1.js
App-2 ===> app2.js
App-3 ===> app3.js
App-4 ===> app4.js
Now If browser client wants to load App-1 then only app1.js will bundled and sent to the client. This will improve app performance by not loading the unneccessary js modules.
Is there any way to acheive the same using webpack?
Thanks in advance.