<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/build-at-zepto-speed-how-we-cut-frontend-webpack-build-times-by-95--naalyyjoz" -->

---
title: Build at Zepto Speed: How We Cut Frontend Webpack Build...
description: Zepto's frontend team reduced CI build times from 20+ minutes to ~2 minutes without migrating away from Webpack. By profiling the pipeline first using...
canonical: https://daily.dev/posts/build-at-zepto-speed-how-we-cut-frontend-webpack-build-times-by-95--naalyyjoz
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Build at Zepto Speed: How We Cut Frontend Webpack Build Times by 95% | daily.dev
og:description: Zepto's frontend team reduced CI build times from 20+ minutes to ~2 minutes without migrating away from Webpack. By profiling the pipeline first using...
og:url: https://daily.dev/posts/build-at-zepto-speed-how-we-cut-frontend-webpack-build-times-by-95--naalyyjoz
og:image: https://api.daily.dev/og/posts/naalyyJOZ.png
og:image:alt: Build at Zepto Speed: How We Cut Frontend Webpack Build Times by 95%
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Build at Zepto Speed: How We Cut Frontend Webpack Build Times by 95%

**[Medium](https://daily.dev/sources/medium_js)** · 10 min read · 1 upvotes · 0 comments

## Summary

Zepto's frontend team reduced CI build times from 20+ minutes to ~2 minutes without migrating away from Webpack. By profiling the pipeline first using ProgressPlugin and Speed Measure Plugin, they discovered the real bottleneck was Terser minification (13+ minutes), not the bundler itself. The fix involved replacing Babel with SWC for transpilation, swapping Terser for esbuild for minification, adopting LightningCSS for CSS optimization, switching to pnpm for dependency management, and restructuring Dockerfiles for better layer caching. A hidden bottleneck — AWS CodeArtifact token expiry causing Docker cache busting — was also resolved. The result was a 95% reduction in build time while preserving ecosystem stability.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://blog.zepto.com/build-at-zepto-speed-how-we-cut-frontend-webpack-build-times-by-95-676440fd7963>

## Questions this post answers

### Why was Terser so slow in my Webpack build and what should I replace it with?

Terser JavaScript minification can become the dominant bottleneck in large Webpack builds, taking over 13 minutes (825 seconds) in one monorepo case versus roughly 295 milliseconds for esbuild on comparable work. Esbuild delivers minified and gzipped sizes within about 5-8% of the smallest results while cutting minification time roughly tenfold, making it a practical Terser replacement via the EsbuildPlugin.

_Anyone chasing slow Webpack builds can compare minifier benchmarks like this on daily.dev before swapping tools._

### Is it worth migrating from Webpack to Vite to fix slow build times?

Not necessarily, because bundler migration does not fix minification bottlenecks. Benchmarking Vite against an actual production pipeline showed that the 13-plus minutes spent in Terser would persist unchanged after migration, since minification cost is independent of the bundler; a four-week migration effort would have left the same problem with a different config syntax.

_Teams weighing a Vite migration can weigh real bottleneck data like this on daily.dev before committing weeks of effort._

### How can pnpm reduce CI dependency installation time compared to npm in a monorepo?

Pnpm uses a content-addressable global store where packages are downloaded once and hard-linked into each project's node_modules, unlike npm's copy-based model. This eliminates duplication across workspaces, lowers disk usage, enables stricter dependency resolution that prevents phantom dependencies, and improves Docker layer caching, all of which cut CI install time in a large monorepo.

_Engineers optimizing monorepo CI pipelines can track package-manager tradeoffs like this on daily.dev._

## Similar posts on daily.dev

- [Build better software to build software better](https://daily.dev/posts/build-better-software-to-build-software-better-kopbq9xdt) · Slack engineering · 67 upvotes · 3 comments
- [Verify faster](https://daily.dev/posts/verify-faster-zmkbwrxol) · RUBYLAND · 0 upvotes · 0 comments
- [I Reduced Our React Bundle by 70% Without Removing a Single Feature](https://daily.dev/posts/i-reduced-our-react-bundle-by-70-without-removing-a-single-feature-szhhzvcpd) · Medium · 18 upvotes · 3 comments
- [The Hidden Cost of Waiting: Build Time as a Productivity Killer](https://daily.dev/posts/the-hidden-cost-of-waiting-build-time-as-a-productivity-killer-kjlvcel46) · Swiggy Bytes · 1 upvotes · 0 comments
- [Shrinking Azure Pipeline task extensions using esbuild](https://daily.dev/posts/shrinking-azure-pipeline-task-extensions-using-esbuild-c1svnmd3y) · DevBlogs · 0 upvotes · 0 comments

---

Tags: [#webdev](https://daily.dev/tags/webdev), [#webpack](https://daily.dev/tags/webpack)

[View this post on daily.dev](https://daily.dev/posts/build-at-zepto-speed-how-we-cut-frontend-webpack-build-times-by-95--naalyyjoz)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Build at Zepto Speed: How We Cut Frontend Webpack Build Times by 95%","url":"https://daily.dev/posts/build-at-zepto-speed-how-we-cut-frontend-webpack-build-times-by-95--naalyyjoz","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/build-at-zepto-speed-how-we-cut-frontend-webpack-build-times-by-95--naalyyjoz"},"datePublished":"2026-07-08T11:34:41.893Z","dateModified":"2026-09-13T19:50:47.717Z","description":"Zepto's frontend team reduced CI build times from 20+ minutes to ~2 minutes without migrating away from Webpack. By profiling the pipeline first using...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/f3b32a421b9fd6a87d02f6a9bf5e902b?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/f3b32a421b9fd6a87d02f6a9bf5e902b?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Medium","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Medium","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/medium","url":"https://daily.dev/sources/medium_js"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/build-at-zepto-speed-how-we-cut-frontend-webpack-build-times-by-95--naalyyjoz","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"webdev,webpack","timeRequired":"PT10M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Medium","item":"https://daily.dev/sources/medium_js"},{"@type":"ListItem","position":3,"name":"Build at Zepto Speed: How We Cut Frontend Webpack Build Times by 95%"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/build-at-zepto-speed-how-we-cut-frontend-webpack-build-times-by-95--naalyyjoz#faq","mainEntity":[{"@type":"Question","name":"Why was Terser so slow in my Webpack build and what should I replace it with?","acceptedAnswer":{"@type":"Answer","text":"Terser JavaScript minification can become the dominant bottleneck in large Webpack builds, taking over 13 minutes (825 seconds) in one monorepo case versus roughly 295 milliseconds for esbuild on comparable work. Esbuild delivers minified and gzipped sizes within about 5-8% of the smallest results while cutting minification time roughly tenfold, making it a practical Terser replacement via the EsbuildPlugin. Anyone chasing slow Webpack builds can compare minifier benchmarks like this on daily.dev before swapping tools."}},{"@type":"Question","name":"Is it worth migrating from Webpack to Vite to fix slow build times?","acceptedAnswer":{"@type":"Answer","text":"Not necessarily, because bundler migration does not fix minification bottlenecks. Benchmarking Vite against an actual production pipeline showed that the 13-plus minutes spent in Terser would persist unchanged after migration, since minification cost is independent of the bundler; a four-week migration effort would have left the same problem with a different config syntax. Teams weighing a Vite migration can weigh real bottleneck data like this on daily.dev before committing weeks of effort."}},{"@type":"Question","name":"How can pnpm reduce CI dependency installation time compared to npm in a monorepo?","acceptedAnswer":{"@type":"Answer","text":"Pnpm uses a content-addressable global store where packages are downloaded once and hard-linked into each project's node_modules, unlike npm's copy-based model. This eliminates duplication across workspaces, lowers disk usage, enables stricter dependency resolution that prevents phantom dependencies, and improves Docker layer caching, all of which cut CI install time in a large monorepo. Engineers optimizing monorepo CI pipelines can track package-manager tradeoffs like this on daily.dev."}}]}
```

