The Web Development Podcast with Fexingo: Frontend, Backend, and Modern Web Stack

Why Your Webpack Bundle Has Duplicate Dependencies


Listen Later

Episode 79 digs into a silent performance killer: duplicate dependencies in your Webpack bundle. Lucas explains how one stray lodash import can balloon bundle size by 200 KB, and walks through real-world examples from a production React app that accidentally included two versions of the same date library. Luna shares a horror story from a past project where duplicate Moment.js instances caused a 1.5-second delay on page load. Together, they cover how to catch duplicates with Webpack Bundle Analyzer and deduplicate via package.json resolutions and Yarn Berry's PnP mode. By the end, you'll know how to shrink your bundle without changing a line of business logic.

#Webpack #BundleOptimization #JavaScript #TreeShaking #Deduplication #WebPerformance #Frontend #React #NodeModules #YarnBerry #BundleAnalyzer #Lodash #MomentJS #TechPodcast #WebDevPodcast #FexingoBusiness #BusinessPodcast #Technology

Keep every episode free: buymeacoffee.com/fexingo

...more
View all episodesView all episodes
Download on the App Store

The Web Development Podcast with Fexingo: Frontend, Backend, and Modern Web StackBy Fexingo