Aurelia 2 bundling portions of application

The 2 main API surfaces for lazy loading in au2 are:

  • Dynamic composition (e.g. passing the promise from import('./my-module.js') to <au-compose>)
  • Routing (either manually dynamically loading a module and passing it into the router, or having lazy loaded child routes (API for this still in progress))

What’s the benefit of lazy loaded global resources instead of lazy loaded scoped resources though? Assuming bundlers take care of the same module only being loaded once…

2 Likes