In the previous article we looked at Web Components in general and explored where Angular Elements comes into play. But creating and using Web Components is only one part of the story. Another key aspect is building and consuming them.

The web can be very sensitive to bundle size, with every byte leading to longer load times and the potential loss of users. As such we need to make sure we are building/bundling Web Components so they are as small as possible.

This article will look at how we can get the bundle size as small as possible; exploring both the current state of Angular and the prospects that Ivy has brought to the table. Here’s the structure of the article:

  • Building and Bundling Web Components in Angular.
  • Other approaches available to us using Ivy.
  • Some limitations and possible solutions…
  • Some key tools.

Let’s get started.

#angular #angular-elements #web components

How to Build and Consum Angular Elements as Web Components
11.75 GEEK