Skip to content

v2.4.0

Compare
Choose a tag to compare
@sokra sokra released this 14 Apr 11:45
· 12979 commits to main since this release

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