Packages

webpack

5.112.2 · 23 Oct 2026MIT76.9M / weekRepositorynpmAtom feed

Your version

2.4.0

14 Apr 2017Where it was published

2.7.0 is the newest release of 2.x.

In short

9 new7 fixed

Release note

Highlighted Features

import() now allows to configure a chunk name

import(/* webpackChunkName: "my-chunk-name" */ "module")

require.ensure has a error callback

require.ensure([], () => {
    require("a");
}, err => {
    console.error("We failed to load chunk: " + err);
}, "chunk-name");

Features

  • Update to acorn 5

  • Resolve context is provided to resolver

  • Add warningsFilter to stats options to filter warnings

  • Add __webpack_chunkname__ to ExtendedAPIPlugin

  • Support string chunk ids

  • Add NamedChunksPlugin which allows to set chunk id, i. e. to chunk name

  • Allow to provided different watch options for multiple compilations

  • Add error handler callback to require.ensure

  • Add chunk name option for import()

Bugfixes

  • Main flag for HMR is set correctly

  • Ignored modules are now context-agnositic

  • Recorded paths are now platform-agnositic

  • Fix for local AMD modules which wrap commonjs

  • Erros now print more detailed message when logged

  • Fix missing SourceMaps for non-entry chunks after rebuild

  • Variables now hoist in scope

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.