🩹 Found a bug in a package and want to fix it locally? Waiting for a fix that wasn't released yet? Don't worry, you can apply all these locally to the packages in your node_modules. In this video, a guide for all major package managers showcases how you can patch your packages locally, why "doing it manually" is not a good idea and which consequences local patches might have.
Worth watching for every developer! 🙌
---
Key points:
4️⃣ Strategies for NPM, Yarn (1 and 2+), PNPM and Bun
✨ Real-world use case!
‼️ Consequences when patching locally
---
Links:
🔗 Nitro https://nitro.unjs.io/
🔗 Real World Issue https://github.com/unjs/db0/issues/62
🔗 patch-package package https://www.npmjs.com/package/patch-package
📺 @DejaVueFm #014 - VueUse and Our Favorite Composables - https://share.transistor.fm/s/27d405c8
Don't forget to hit that "Subscribe" button, ring the notification bell and give a thumbs up!
🌐 Connect further:
Website: https://www.lichter.io
Twitter/X: https://twitter.com/TheAlexLichter
Twitch: https://www.twitch.tv/TheAlexLichter
---
Chapters:
00:00 Intro
00:32 Agenda
01:27 Demo Application and Real World Error
02:36 Googling the Error and Finding an Issue
03:30 Unmerged PR which Fixes the Error
04:30 Manually Patching the Package
05:30 Problems with Manual Patches
06:30 Patching Packages with NPM
10:22 Patching Packages with Yarn 1
11:33 Patching Packages with Yarn 2 and higher
13:55 Patching Packages with PNPM
15:19 Patching Packages with Bun
16:49 Consequences of Patching Packages
18:44 Summary