ljharb / object.assign

ES6 spec-compliant Object.assign shim. From https://github.com/es-shims/es6-shim
https://tc39.es/ecma262/#sec-object.assign
MIT License
107 stars 22 forks source link

The npm package size is 1MB because of test.html #85

Closed nickolay closed 7 months ago

nickolay commented 7 months ago

Installing this package in a new project results in a >1MB node_modules:

$ mkdir test && cd test
$ npm init -y
$ npm i object.assign
added 13 packages, and audited 14 packages in 838ms
$ du -hs node_modules/object.assign
1.2M    node_modules/object.assign

This is consistent with https://www.npmjs.com/package/object.assign reporting the "unpacked size" of 1.17 MB.

Most of this is a single file node_modules/object.assign/test.html weighing a full megabyte. Given that this package has 30M weekly downloads, would you consider removing it from the package?

ljharb commented 7 months ago

whoops, including that file is definitely a mistake, it's just bundler output for testing. I'll absolutely publish a patch removing it.

ljharb commented 7 months ago

v4.1.5 published. Thanks for calling that out!

nickolay commented 7 months ago

Awesome, thank you!