InversifyJS icon indicating copy to clipboard operation
InversifyJS copied to clipboard

Improve Bundling (switch to rollup)

Open narcisbugeag opened this issue 4 years ago • 0 comments

I was sitting and looking over the NPM downloads of this library, and the size of the bundle jumped out at me.

image I mean, 1.15 MB with 400 files for a library? Seems a little too much to me.

That's why I thought it would be cool to switch to rollup, like the other libraries.

Results: ~194kb and only 3 files, no more! image

Also, to be able to merge all the .d.ts into single file, I used @microsoft/api-extractor, which imo is really good and efficient.

TODO:

  • [ ] Fix tests (or switch to JEST)
  • [ ] Improve CI

narcisbugeag avatar Aug 25 '21 00:08 narcisbugeag