Still on Webpack?

Webpack build dragging or upgrade stalled? We sort it out.

A lot of production apps still run on Webpack, usually through a config somebody forked from a template five years ago. We read the config end to end, work out which loaders and plugins are actually earning their place, and either tune the current build or move it onto something lighter without losing a single feature along the way.

  • Since 2015Fixing technology
  • FreeEstimates
  • US teamReal engineers

webpack-build.log

still failing

What it is

Webpack at a glance

Webpack is a static module bundler for JavaScript applications, first released by Tobias Koppers in 2012. It takes an entry point, walks every import and require it reaches, and emits bundles the browser can actually load. It was the dominant bundler of the single-page app era, and large parts of the ecosystem, including Create React App, Next.js before Turbopack, Angular's older CLI, and most enterprise build pipelines, are still built on it.

The version 5 release in 2020 was a real cutover: automatic Node polyfills were removed, the filesystem cache was rewritten, Module Federation arrived, and asset modules replaced file-loader and url-loader. Teams still on version 4 face a non-trivial upgrade, and teams on version 5 still have to manage loaders, plugins, source maps, chunk splitting and tree-shaking configuration by hand.

Type
Static module bundler for JavaScript
First released
2012
License
MIT, open source
Maintained by
The webpack organisation and its core contributors
Typically used for
Single-page apps, library builds, enterprise front-ends, legacy React and Angular projects, Module Federation microfrontends

The honest version

Webpack pros and cons

No technology is all upside. This is where Webpack earns its place and where it tends to cause trouble.

Where Webpack is strong

  • The most battle-tested bundler in the industryA decade of production use means almost every edge case has been hit by someone before, and there is usually a plugin or a Stack Overflow thread for the problem you are looking at.
  • Module Federation is still uniqueRuntime code sharing between independently deployed bundles is a feature Webpack 5 shipped first, and remains the easiest path for microfrontend architectures that need it.
  • Extremely fine-grained controlIf you need to intercept exactly one asset type with a bespoke rule, Webpack will let you do it. Few newer bundlers expose as many hooks to the end user.
  • Huge loader and plugin ecosystemEvery file format you can imagine has a loader, and most common tasks have multiple competing plugins to pick from.
  • First-class code splittingSplitChunksPlugin, dynamic imports and runtime chunks are mature features, not a bolt-on, so splitting a monolith bundle into reasonable pieces is well understood.
  • Works with everything already in placeBabel, PostCSS, TypeScript, SWC and esbuild all have loaders. Switching one transformer rarely requires touching the rest of the pipeline.

Where Webpack bites

  • Cold starts and rebuilds are slowEven with persistent cache enabled, a cold build on a medium-size application can run for minutes, and new developers lose the whole first morning to installing the pipeline.
  • Configuration drift is the defaultA webpack.config that started small accumulates custom loaders, overrides and env branches until nobody can delete a line without something breaking in a non-obvious place.
  • Version 4 to 5 is a real migrationDropped Node polyfills, renamed plugin APIs, changed hashing and deprecated loader signatures combine into weeks of work on a mature app, and partial upgrades often leave the build wedged.
  • Memory consumption keeps climbingLarger apps regularly hit the Node heap ceiling during a full build, and the fix is almost always flags, workers or cache rather than a one-line config change.
  • Error messages are infamousA stray syntax error or missing loader usually surfaces as a long compiler trace pointing at a transitive module rather than the real source, which costs time on every incident.
  • Momentum has moved elsewhereNew starters pick Vite or Turbopack. Hiring people who want to spend a quarter inside webpack internals is harder every year, and plugin authors are following their users.

Sound familiar?

Common Webpack problems we fix

The Webpack problems that bring people to us, and what you have once each one is fixed.

Can't resolve 'crypto' in '/app/src'

Node core modules refuse to resolve

A dependency that worked on version 4 pulled in crypto, stream or buffer through automatic polyfills, and the version 5 upgrade removed those shims without warning the consumer.

Correct fallbacks or a browser build

Invalid configuration object

The webpack.config does not even parse

A partial version bump, a plugin whose API changed, or a loader entry that no longer matches the schema. The validation message points at the surface, not the cause.

Config valid, build booting

JavaScript heap out of memory

The build keeps running out of memory

A large source tree, source maps at full detail, and no caching means the compiler is holding the whole graph in memory and eventually the process is killed.

Heap under control, caching on

compiled in 487,201 ms

Full builds take the best part of ten minutes

Loaders running on every file in node_modules, source maps regenerating from scratch, and no persistent cache mean each CI run is a cold build.

Build time back inside a coffee break

Module parse failed: Unexpected token

A dependency ships syntax Webpack cannot parse

A package publishes modern JavaScript with no build step of its own, and the Babel or SWC loader is excluded from node_modules by convention.

Loader scoped correctly, parse clean

MiniCssExtractPlugin: Conflicting order between chunks

CSS order changes between builds

Deterministic hashing picks up a new order every time import graphs shift slightly, which breaks caching and surfaces as visual regressions in production.

Deterministic output, stable hashes

no owner, no documentation

The build was written by someone who left

A long webpack.config.js with half the loaders undocumented, a mix of plugins from different eras, and no README. Nobody wants to touch it in case something breaks.

Documented, understood, and maintainable

Module Federation runtime error

Microfrontends stopped talking to each other

Shared dependencies drifted between host and remote, a shared singleton was bundled twice, or the remoteEntry.js is being served from the wrong origin.

Shared graph aligned, remotes loading

What we do

Webpack help, from upgrade to replacement

Call us for one failing build, or hand us the whole pipeline.

Rescue
A build that will not finish, a dev server that crashes, or an upgrade halted halfway. We get it compiling before we explain what we had to change.
Version 4 to 5 upgrades
Polyfill migration, plugin API updates, asset module conversion and loader audit, rehearsed on a branch and only then merged.
Build performance
Persistent cache, thread-loader where it helps, trimmed source maps, loader scoping and output optimisation. We measure before and after.
Move to Vite or Turbopack
If the workload no longer needs Webpack's depth, we migrate the project onto a faster bundler without losing loaders you actually depend on.
Module Federation
Host and remote setup, shared dependency strategy, versioning and CI integration for teams running microfrontends in anger.
Managed Tech
An engineer on retainer for upgrades, plugin maintenance and the build failures that always seem to land the morning of a release.

How it works

From first message to fixed

  1. Look Free estimate

    Tell us what's going wrong. We look at it, then tell you plainly what's wrong and what it will cost.

  2. Fix

    We fix the cause, not the symptom. If something is down, getting it back up comes first.

  3. Harden

    Backups, monitoring, updates and access, so the same problem can't quietly come back.

  4. Hand back or stay on

    You get a plain-language write-up. Or we stay on for hosting, upkeep and new work.

Often found together

Running Webpack alongside something else?

We work on the whole stack, so the problem can be wherever it actually is.

Questions

Webpack questions

Something else? Call+1 737 727 7327

Can you upgrade us from Webpack 4 to Webpack 5?

Yes, and this is a large share of the work we take on. We branch the repo, migrate polyfills one dependency at a time, port plugin APIs, test the hashing behaviour on the deploy pipeline, and only merge once the production build and CI are both passing on the new version for a full week.

Should we migrate off Webpack to Vite?

Sometimes yes, sometimes no. Projects that mostly use standard loaders move cleanly, and the dev experience improves immediately. Projects leaning on Module Federation or a custom plugin graph may be better off tuning Webpack instead. We will tell you which case yours is after a config review.

Why is our Webpack build so slow?

The most common causes are no persistent cache, source maps at full fidelity in every run, loaders that are not scoped away from node_modules, and a config that has quietly grown a dozen plugins over the years. Most projects get a two to five times speedup once those are addressed.

Our build runs out of memory. What can we do?

Usually either increase the Node heap, enable filesystem caching, split source maps out of the critical path, or reduce what the loaders are doing per file. In extreme cases we switch an expensive transform to SWC or esbuild and keep Webpack for the final assembly step.

Can you document a Webpack config nobody understands any more?

Yes. We read the config top to bottom, identify what each loader and plugin is doing in practice, and produce a short written guide that lives next to the config. After that, changing it is a normal task rather than an archaeology project.

How much does Webpack help cost?

Estimates are free and take about a day. Share the config and a recent build log, and you will have a written quote before anything is touched.

Free estimate

Webpack config giving you trouble?

Tell us what you're running and what's going wrong. A person reads it and comes back with an estimate.

  • No charge to find out what it will take
  • If it's urgent, say so

Replies come from a person. By sending, you authorize us to email you back. No marketing.