Closed BreakBB closed 1 year ago
quite unusual
Not a standard practice, but many npm packages do this. @babel/core
ships one, webpack
does…
The main reasons for shipping src are:
I doubt 40 kB is a problem. Especially since pdfjs-dist, dependency we use, takes 31.1 MB in my node_modules folder.
I didn't thought about it that way, thank you for the answer 👍🏻
Before you start - checklist
Description
Currently the entire
src
folder is shipped together with thedist
folder.Is there a reason for this? From my experience it is quite unusual to ship the code in the npm package.
Proposed solution
Remove this line:
https://github.com/wojtekmaj/react-pdf/blob/459c15b545d25ef382470c749c7afd6de54b214c/package.json#L106
This reduces the package size by ~35% (106kb -> 68kb) and will have a similar result for the unpacked module.
Alternatives
No response
Additional information
No response