Articles with #code-splitting

  • Angular: Dynamic Importing Large Libraries
    2019-03-06
    This post explains how to import large 3rd-party libraries into your Angular application without pain on initial payload size. Example: Chart.js in Angular Chart.js is a popular library to render rich charts. It contains a lot of features and its payload size is huge. To use it in your Angular application, typically you write a import statement in TypeScript code and call it like the below; import { Component, ViewChild, ElementRef } from "@angular/core"; // Import ‘chart.