Is it possible to code split an already built and generated javascript file into multiple js files ? How?

Viewed 92

I understand that whatever frontend technology we are using to build our web apps , there are some good code splitting solutions for better loading times that split the js file into multiple files that are loaded as per demand later.

What I need to know is if there is a way to code split built javascript file into multiple js files that also support loading on demand ....?

Although it sounds like very difficult problem. I feel like there is definitely a possibility to achieve this by building a dependency tree of functions or objects and then putting large chunks of code that are losely coupled , into seperate files and add some stub code that will fetch it when needed.

0 Answers
Related