Skip to content

Resolve "Using library significantly increases bundle size"

NOTE: After this is merged to master, we need to update the new version in the portal, skeleton and the other services!

Closes #1 (closed)

When having the code of this library directly inside of an app, the bundle size was 292 kB.

When using this library built with rollup in the app instead, the bundle size increased to 715 kB (2.45x).

When using this library built with tsc in the app instead, the bundle size increased to 299 kB (1.02x), which is close to the margin of error (since builds are not 100% reproducible).

The reasons for those differences are unclear, but since the tsc approach results in only a very marginal difference, it will be used instead, especially since there are no other disadvantages. Additionally, the builds using tsc are also faster than rollup, which is a nice bonus.

Edited by François Martin

Merge request reports