contents icon indicating copy to clipboard operation
contents copied to clipboard

Improve package size

Open QuarksToQuasars opened this issue 9 years ago • 5 comments
trafficstars

The package is quite heavy (actually too heavy) with having full "babel": "^5.8.23" as dependency. As far as I can see only babel-polyfill is need. Is that correct?

If yes, would it make sense / possible to replace this with babel-polyfill or babel-runtime (or even just core-js only) and move babel to devDependencies?

QuarksToQuasars avatar Nov 07 '16 11:11 QuarksToQuasars

As far as I can tell, you are right. In fact, "browser" bundle ought to be removed altogether. There is no good use case, everyone is using a package manager these days (or should be).

I cannot think of a reason for needing Babel as a dependency. I'd be happy to investigate further. However, the code base is quite out of sync with my current workflow. I have recently brought one of the libraries that I maintain up to speed (see https://github.com/gajus/swing/pull/86). If you could raise an equivalent PR, I'd be happy to investigate the bundle size.

gajus avatar Nov 07 '16 11:11 gajus

I was rather worrying about the dependency tree rather than the actual (browser) bundle size. Bundle actually increased a bit ... probably due to the newer core-js, however, as you said most people probably don't care and using it as a package dependency rather than as browser bundle.

QuarksToQuasars avatar Nov 11 '16 20:11 QuarksToQuasars

Doesn't it make sense ?

QuarksToQuasars avatar Nov 25 '16 12:11 QuarksToQuasars

It makes sense. I don't have a use case for contents package at the moment. Therefore, prioritising its development over active dependencies would be irrational. However, if there is a Good Samaritan that wants to contribute a PR, I am happy to review it and release it if appropriate.

gajus avatar Nov 25 '16 12:11 gajus

Sorry, I was referring to both my reasoning and the respective PR https://github.com/gajus/contents/pull/21

QuarksToQuasars avatar Nov 25 '16 12:11 QuarksToQuasars