Webpack Lazy Loading
https://webpack.js.org/guides/lazy-loading/
Lazy, or "on demand", loading is a great way to optimize your site or application. This practice essentially involves splitting your code at logical breakpoints, and then loading it once the user has done something that requires, or will require, a new block of code. This speeds up the initial load of the application and lightens its overall weight as some blocks may never even be loaded.
- Frameworks Many frameworks and libraries have their own recommendations on how this should be accomplished within their methodologies. Here are a few examples:
React: Code Splitting and Lazy Loading Vue: Lazy Load in Vue using Webpack's code splitting AngularJS: AngularJS + Webpack = lazyLoad by @var_bincom
- Further Reading Lazy Loading ES2015 Modules in the Browser