New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove unused dependencies #636
Conversation
This pull request is being automatically deployed with ZEIT Now (learn more). 馃攳 Inspect: https://zeit.co/primer/primer-components/ea8ehz1e4 |
Weird, I'm not sure either. At first I thought it was maybe a peerDep of something? But no. Maybe bundlephobia assumes it exists when it sees React? |
Clean up, clean up!
I ran depcheck on Primer Components and found a bunch of unused deps! Removing them 馃帀
I also found a couple of other relics from the past that I removed:
script
folder which only contains theprepack
script that's not being used anymoreAlso,
react-dom
was a dependency, but it only used in our tests (because some package we are using in our tests has it as a peerDep) so I moved it to devDeps. I think this is safe to do - the deploy site looks great and I double-triple checked that we aren't calling anyReactDOM
methods or importingreact-dom
anywhere - but for some reason bundlephobia classifies it as a missing dependency 馃 https://bundlephobia.com/result?p=@primer/components@0.0.0-acfdf18 Curious what you think @BinaryMuseAll of that cut our bundle size almost in half 馃帀 It's now sitting at 49kb, down from 84.8kb.
Sidenote: If we move over to @github/details-dialog-element for our Dialog I think we can get down to ~ 28kb. Still feels semi-big but not sure what to use as a benchmark.
byeeeee! 馃憢馃憢馃憢