Webpack 4.30 is required for acorn 6 transition. Needs webassemblyjs - ITP 942455.

Webpack 4.7 is available in unstable.


  1. Run tests (currently disabled because jest is not packaged).

Major changes

  1. Now entry, output options on command line are mandatory and we get a warning if mode option is not specified. Check node-d3-request (commit)

  2. production and development are new modes and each has its on default options. production mode does minify by default.

  3. entry option in command line must have ./ prefix to directory path (--entry src/index.js will not work, but --entry ./src/index.js will work). See node-turbolinks commit.

  4. Output files are now created under dist directory by default.
  5. node_modules/.cache should be removed in clean target.

  6. node-grunt-webpack should be >= 3.1.

  7. webpack.optimize.UglifyJsPlugin has been removed, please use config.optimization.minimize instead. Check this patch or this commit (where a single config file creates multiple output files and only one of them we need minimized). Replace "plugin" field with "optimization" or remove "plugin" field and just set "mode" to production.

  8. configuration.module has an unknown property 'loaders'. Change loaders to rules under modules. Example commit

  9. Change target web to target node in debian/rules or debian/webpack.config.js. Example d/rules commit and d/webpack.config.js commit

Steps to build with webpack 4

  1. clone repo from salsa (gbp clone --pristine-tar)

  2. Update debian/control and change webpack dependency to >= 4~ to force building with webpack 4 (without this, package in unstable will be used).

  3. Build on experimental. See sbuild#Enabling_experimental

Involved packages

Command used to find the list: reverse-depends -b webpack

Packages for upstream modification

Already compatible with webpack 4

Ready in unstable

Ready with patch in BTS/git repo

Supported in new upstream release

Packages that needs to move to unstable with webpack 4