Skip to content

Upgrading webpack 1 to 2

Breaking1.15.0 → 2.7.0Breaking4New55Changed9Fixed89Other3

BreakingUpgrade verdict

4 breaking changes.

  • Renamed enforce: "left"/"right" to enforce: "pre"/"post", because it's easier to understand and makes migration simpler.
  • Reverted breaking change from last version.
  • In ES module (import or export exists in module).
  • Using CommonJS or AMD export stuff in a ES2015 module will emit errors.
Top 3 of 4 that need code or config changes

Node.js requirement changed in 2.2.0-rc.8: >=0.6 → >=4.3.0 <5.0.0 || >=5.10.

Adds acorn-dynamic-import ^2.0.0, ajv ^4.7.0, ajv-keywords ^1.1.1, json-loader ^0.5.4, json5 ^0.5.1, loader-runner ^2.3.0, source-map ^0.5.3, webpack-sources ^1.0.1, yargs ^6.0.0.

Drops clone, optimist, webpack-core.

Installs 356 packages in all (was 268).

Breaking4
Renamed enforce: "left"/"right" to enforce: "pre"/"post", because it's easier to understand and makes migration simpler.
Reverted breaking change from last version.
In ES module (import or export exists in module).
importexportexportsdefinemodule.exports
Using CommonJS or AMD export stuff in a ES2015 module will emit errors.