Leonidas-from-XIV / node-xml2js

XML to JavaScript object converter.
MIT License
4.84k stars 598 forks source link

Build size ~160kB ? #618

Closed Glideh closed 2 years ago

Glideh commented 2 years ago

Is ~160kB the expected build size of the library ? Seems quite big, is there a way to use a subset ? Is it tree shakeable or something ?

Good tools BTW, that works very well for me

Leonidas-from-XIV commented 2 years ago

I checked the built JS files and they're about 22kB, nowhere near 200kB.

Glideh commented 2 years ago

I mean not zipped, I'm getting about 44kB zipped, I'm going to investigate further

Leonidas-from-XIV commented 2 years ago

Look in the lib folder, the files there are less than 22kB unzipped. If you compress them and get double the size than uncompressed then there is something wrong with your tools.

Glideh commented 2 years ago

Well the 160kB unzipped is including the dependencies, xml2js indeed takes only 20Kb Screenshot from 2021-07-26 14-48-54

So these 160kB including dependencies are expected ?

Leonidas-from-XIV commented 2 years ago

Yes, I have no control about the size of the dependencies. Future releases are planned to get rid of xmlbuilder but that's a glacial work in progress.

Glideh commented 2 years ago

Ok at least my webpack settings are not wrong :) Thx for your time.