Image for post
Image for post

Road to webpack 4 (week 20–21)


Tobias Koppers
Aug 28, 2017 · 3 min read

It has been more than 2 weeks after I installed the auto-closing bot for the webpack/webpack repo. There was a warning period of 15 days. This means bot closed all inactive issue → issue count went from 700 to 500 open issues :)

The process worked really great. Many incorrectly flagged issues where revived in the warning period by watchers.

Reviving is pretty easy as you just have to comment on the issue. The bot will automatically remove the inactive label.

Currently issues with 10 or more 👍 are never flagged inactive.

I guess I will lower the time until inactive to get rid of more issues. You should collect 10 👍 to have long-living issues.

Currently the high number of issue hide the important ones…



  • WASM support
  • New CSS workflow
  • Support for async script tags
  • Performance improvements
  • Optimization for ESM without side-effects
  • Support typings for plugins/hooks

These goals require some breaking changes:

  • New syntax for hooking into plugin hooks
    There will be a new tapable version which also include other improvements.
  • Add a type to modules (JS, ESM, WASM, CSS)
    This requires a lot of refactoring in the Asset Generation.
  • Refactoring of the Runtime code
    This allows different runtime code for different module type
  • Pushing to array instead of pure JSONP
    This allows to load chunks in any order on bootstrap.
  • and more minor breaking changes


WASM Support

  • WASM module type
  • Asset Generation for WASM
  • Runtime code for WASM
  • WASM Parser to extract imports/exports


  • CSS module type
  • Asset Generation for CSS
  • Runtime code for CSS
  • CSS Parser to extract imports/exports

Async script tag

  • Changes to chunk loading runtime code
    wpJSONP = wpJSONP || [];wpJSONP.push(...) instead of wpJSONP(...)
  • Block entry point execution until all required chunks are ready
  • Options to define position to runtime code as it can be in any entry chunk now

Performance improvements

  • Merge outstanding performance PRs
  • Enforce best performance for plugin hooks
  • Refactor more Arrays to Sets

Optimization for ESM without side-effects

  • Refactoring for ESM handling to allow more optimizations
  • Add support for "side-effects": false in package.json
  • Reconnect dependencies when side-effect-free modules are involved
  • Remove dependencies to side-effect-free modules when they are not used

Support typings for plugins/hooks

  • Rewrite tapable to allow typing, promises and improve performance
  • Create backward-compatibility layer to support old code
  • Refactor webpack and internal plugins to use new API

Stable Version


There will be a RC at least 1 month before the Release. This should allow plugin authors to test/upgrade their plugins to the breaking changes.

< week 18–19 week 22–23 >

webpack is not backed by a big company, unlike many other big Open Source products. The development is funded by donations. Please consider donating if you depend on webpack… (Ask your boss!)

Special thanks to these sponsors: (Top 5)


The official Medium publication for the webpack open source…

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store