viclafouch / mui-file-input

A file input designed for the React library MUI (Material UI) V6
https://viclafouch.github.io/mui-file-input/
MIT License
79 stars 17 forks source link

`pretty-bytes` dependency shouldn't be bundled #5

Closed jaydenseric closed 1 year ago

jaydenseric commented 1 year ago

Describe the bug

This package has a pretty-bytes dependency, but it's incorrectly bundled into the published files of this module. This is an anti-pattern for a bunch of reasons, but the main one is that if the same dependency is used anywhere else in your app the code is duplicated in an app bundle or for the runtime to process, instead of being a shared dependency.

To Reproduce

Look at the published module and notice the pretty-bytes isn't imported, but it's source code has been included directly in the module:

https://unpkg.com/browse/mui-file-input@1.1.3/dist/mui-file-input.es.js

Expected behavior

Dependencies of published packages should be imported and never bundled.

Screenshots

N/A.

Desktop (please complete the following information):

N/A.

Smartphone (please complete the following information):

N/A.

Additional context

N/A.