Skip to content

Upgrading mini-css-extract-plugin 0.12 to 1

Breaking0.12.0 → 1.6.2Breaking5Platform1New8Changed1Fixed25Other1

BreakingUpgrade verdict

5 breaking changes and a platform requirement change.

  • CSS imports now behave like ES modules by default, so old require() calls that read class names need to become import statements.
  • The moduleFilename setting is gone; use filename instead.
  • You no longer configure hot reloading manually; it turns on by itself when hot module replacement is enabled.
  • The reloadAll setting is no longer available.
Top 4 of 6 that need code or config changes

Node.js requirement changed in 1.0.0: >= 6.9.0 → >= 10.13.0.

Drops normalize-url.

Installs 16 packages in all (was 24).

Breaking5
Makes the esModule option true by default, so CommonJS require of CSS no longer returns locals directly.
esModule
Removes the moduleFilename option in favor of the filename option.
moduleFilenamefilename
Removes the hmr option; HMR now works automatically with HotModuleReplacement or webpack-dev-server hot mode.
hmrHotModuleReplacementwebpack-dev-server
Removes the reloadAll option.
reloadAll
Options are now validated with stricter rules that reject unknown additional properties, so leftover options such as the loader's hmr option cause an error.
hmr
Platform1
Raises the minimum supported Node.js version to 10.13.0.