Closed dwidc closed 4 years ago
Thanks for the report, @dwidc! I will update .npmignore
to reduce bundle size as soon as I can get around to it. PRs also welcome.
@cooperka To make this work with Yarn, would you rather only have a files
field (to include all necessary files) or only have a .npmignore
(to exclude all unnecessary files)?
Hmm it seems like exclusion may be more flexible/simpler. For example to include src but not tests, and some of android but not all. I suppose the downside is that it would be partially redundant with .gitignore? I can accept that 🤷♂️
With https://github.com/cooperka/react-native-snackbar/pull/154, I now kind of went the middle way. It effectively still works the same as before but uses .npmignore
instead of the files
field in order to work around Yarn’s different behavior.
I found that your npm package includes large temporary android files. For example, folder
/android/build
alone is about 13mb. Mostly on/android/build/tmp
and/android/build/intermediates
Shouldn't you exclude those folders from publishing? I also checked on
https://www.npmjs.com/package/react-native-snackbar
your total package is about 20mb.