I've Been Ignorant For Too Long: PNPM Is Really Great!
Вставка
- Опубліковано 20 лип 2024
- ✨ Become a PRO today via www.frontend.fyi/pro
💬 Join us on Discord: www.frontend.fyi/discord
I've never really looked at PNPM until last week. I thought it was hyped a bit, but not really used a lot. Until I started to dive into a bit more, and noticed a lot of popular open source libraries used it too.
The biggest benefit for me is the fact that it does NOT copy all your node modules 500 times on your Mac/PC. Saving you a ton of disk space!
👀 Timestamps
00:00 - Intro
00:20 - Why I looked into PNPM
01:24 - Short intro to PNPM and its benefits
03:17 - Converting an existing project to PNPM
04:50 - Compare NPM, Yarn and PNPM installation speeds
09:38 - PNPM's symlinking magic saving disk space
10:45 - Outro
#npm #pnpm #packagemanagers #frontend #webdevelopment #frontendfyi - Наука та технологія
I prefer pnpm for personal projects especially in conjunction with turborepo. It's speed galore.
For public-facing projects, where public contribution could happen, I tend to stick to npm since anyone working with node WILL have npm. No extra installs.
Also, pnpm's lack of just being able to rm -rf node_modules is something to consider when you are working with beta libraries, where doing the removal is a normal part of the debugging workflow.
Love these thoughts, thank you so much 🙏
pnpm is great! i wanted to make the switch but i enjoy using `yarn upgrade-interactive` way too much to do it.
btw you forgot to test yarn v2/v3 which is used when you do `yarn init -2`
You’re totally right! I thought about that too when editing.. Although the speed comparison would’ve become even more boring then right 😂
What terminal are you using? Video was great!
The terminal is called Warp!
But how much disk space it saved you?
And from today we have another performance boost for pnpm thanks to multi threading 🚀
🤯
what keyboard you use?
It’s the Mode Sonnet.
@@frontendfyi dou you recommend?
Yes I do! Never had a nicer keyboard 🤯 But yeah, it is quite the investment though.. Although I think it's definitely worth it - especially since in my case you can hear it in the video, and as you noticed it has a positive effect. If it would be a horrible sound, it would annoy people, so in that case I would need to switch to for example an apple keyboard that's super quiet. But I don't want that, haha. So I'm glad I can use my mechanical keyboard in the videos too!
Does it work on windows yet?
It does actually! They fixed the symlinking issue there!
oh... I saw that you were stuck with yarn 1.22. Yarn 3 is way faster.
I don't know, Pnpm is too long when I use `pnpm install` and tons of bugs . I shall stick to npm since it gets my works done
Sounds fine too! Use whatever feels best or natural to you right! In the end we’re talking about micro optimizations here. Just do what you enjoy 😁
Haaaaa!