Posts List

Lazy Load 3rd party scripts in lazy loaded Angular module with webpack

How to lazy load 3rd party scripts globally in Angular using Typescript and webpack We are busy migrating our web app from AngularJS 1.6 all the way up to Angular 7. For this we needed to migrate our ImageEditor module which allows users to customise images in the web app. For this module we relied on the TUI image editor plugin. Since this module is not needed on bootstrap we decided to lazy load it and wanted to have the vendors lazy load as well to optimise our apps startup time.