<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/webpack-jd39eaxyw" -->

---
title: webpack | daily.dev
description: The webpack team shares a retrospective on bug fixes since webpack 5's release two months prior, including a tricky edge case involving tree shaking, split...
canonical: https://daily.dev/posts/webpack-jd39eaxyw
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: webpack | daily.dev
og:description: The webpack team shares a retrospective on bug fixes since webpack 5's release two months prior, including a tricky edge case involving tree shaking, split...
og:url: https://daily.dev/posts/webpack-jd39eaxyw
og:image: https://api.daily.dev/og/posts/jD39EaxYw.png
og:image:alt: webpack
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.

# webpack

**[webpack](https://daily.dev/sources/webpack-blog)** · 13 min read · 0 upvotes · 0 comments

## Summary

The webpack team shares a retrospective on bug fixes since webpack 5's release two months prior, including a tricky edge case involving tree shaking, split chunks, and side-effect-free modules that required building a new 'runtime-dependent code generation' internal feature. The post then lays out plans for 2021: further stabilizing webpack 5, expanding ECMAScript Modules support (chunk loading, self-executed chunks, ESM exports/externals/library output), adding CSS and HTML as first-class native module types, improving SourceMap performance, supporting package.json exports/imports fields, better CommonJS analysis, HMR for Module Federation, a new hints system, multi-threading exploration, and eventually enabling WebAssembly by default. The team notes uncertainty due to ongoing sponsorship constraints.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://webpack.js.org/blog/2020-12-08-roadmap-2021>

## Questions this post answers

### Why do I get an 'undefined is not a function' error at runtime after upgrading to webpack 5 with custom splitChunks merging vendors?

This happens in an edge case where modules from two entrypoints get merged into a single chunk via a custom splitChunks name option, and they reference a side-effect-free module used by only one entrypoint. The shared chunk generates code referencing that module for both entrypoints, but it's missing at runtime for the one that doesn't use it, causing undefined errors. Webpack 5 fixed this with a new runtime-dependent code generation feature that wraps such code in conditional blocks per runtime.

_daily.dev surfaces bundler internals like this so webpack upgrades don't break production silently._

### Does webpack 5 support native CSS and HTML as module types?

Not yet as of this writing; webpack 5 still relies on css-loader, style-loader, or mini-css-extract-plugin for CSS, and has no native HTML entrypoint support. The team plans to add CSS as a native module type to enable tree shaking of unused CSS rules and Atomic CSS-style optimizations, plus HTML entrypoints inspired by Parcel, though a competing WebComponents 'CSS Modules' browser proposal complicates alignment.

_Follow bundler roadmap changes like these on daily.dev before locking in a build tool choice._

### What is Module Federation in webpack 5 and what limitation does it have with Hot Module Replacement?

Module Federation is a webpack 5 feature that lets multiple independently built applications integrate and share code at runtime. Its current limitation is that Hot Module Replacement only works within a single build at a time, so updates cannot bubble between separately federated builds, which the webpack team planned to improve to smooth out developing federated applications.

_daily.dev helps teams building micro-frontends track Module Federation developments as they ship._

## Similar posts on daily.dev

- [webpack](https://daily.dev/posts/webpack-xfuofstyh) · webpack · 7 upvotes · 5 comments
- [Webpack Publishes 2026 Roadmap with Native CSS Support, Universal Target, and Path to Version 6](https://daily.dev/posts/webpack-publishes-2026-roadmap-with-native-css-support-universal-target-and-path-to-version-6-st4ioteyv) · InfoQ · 5 upvotes · 0 comments
- [Webpack 5.110](https://daily.dev/posts/webpack-5-110-yid8nftne) · webpack · 0 upvotes · 0 comments
- [Webpack 5.111](https://daily.dev/posts/webpack-5-111-mt0gmxzdi) · webpack · 6 upvotes · 1 comments

---

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

[View this post on daily.dev](https://daily.dev/posts/webpack-jd39eaxyw)

```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":"webpack","url":"https://daily.dev/posts/webpack-jd39eaxyw","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/webpack-jd39eaxyw"},"datePublished":"2026-08-23T12:19:42.126Z","dateModified":"2026-08-23T12:38:09.893Z","description":"The webpack team shares a retrospective on bug fixes since webpack 5's release two months prior, including a tricky edge case involving tree shaking, split...","image":"https://media.daily.dev/image/upload/s--1KxV4ohY--/f_auto/v1722860400/public/Placeholder%2007","thumbnailUrl":"https://media.daily.dev/image/upload/s--1KxV4ohY--/f_auto/v1722860400/public/Placeholder%2007","isAccessibleForFree":true,"articleSection":"webpack","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":"webpack","logo":"https://media.daily.dev/image/upload/s--IMWiEoiP--/f_auto,q_auto/v1787487498/logos/webpack-blog?_a=BAMAMicg0","url":"https://daily.dev/sources/webpack-blog"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/webpack-jd39eaxyw","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"javascript,webassembly,webpack","timeRequired":"PT13M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"webpack","item":"https://daily.dev/sources/webpack-blog"},{"@type":"ListItem","position":3,"name":"webpack"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/webpack-jd39eaxyw#faq","mainEntity":[{"@type":"Question","name":"Why do I get an 'undefined is not a function' error at runtime after upgrading to webpack 5 with custom splitChunks merging vendors?","acceptedAnswer":{"@type":"Answer","text":"This happens in an edge case where modules from two entrypoints get merged into a single chunk via a custom splitChunks name option, and they reference a side-effect-free module used by only one entrypoint. The shared chunk generates code referencing that module for both entrypoints, but it's missing at runtime for the one that doesn't use it, causing undefined errors. Webpack 5 fixed this with a new runtime-dependent code generation feature that wraps such code in conditional blocks per runtime. daily.dev surfaces bundler internals like this so webpack upgrades don't break production silently."}},{"@type":"Question","name":"Does webpack 5 support native CSS and HTML as module types?","acceptedAnswer":{"@type":"Answer","text":"Not yet as of this writing; webpack 5 still relies on css-loader, style-loader, or mini-css-extract-plugin for CSS, and has no native HTML entrypoint support. The team plans to add CSS as a native module type to enable tree shaking of unused CSS rules and Atomic CSS-style optimizations, plus HTML entrypoints inspired by Parcel, though a competing WebComponents 'CSS Modules' browser proposal complicates alignment. Follow bundler roadmap changes like these on daily.dev before locking in a build tool choice."}},{"@type":"Question","name":"What is Module Federation in webpack 5 and what limitation does it have with Hot Module Replacement?","acceptedAnswer":{"@type":"Answer","text":"Module Federation is a webpack 5 feature that lets multiple independently built applications integrate and share code at runtime. Its current limitation is that Hot Module Replacement only works within a single build at a time, so updates cannot bubble between separately federated builds, which the webpack team planned to improve to smooth out developing federated applications. daily.dev helps teams building micro-frontends track Module Federation developments as they ship."}}]}
```

