Skip to content

Upgrading css-loader 0.28 to 1

Breaking0.28.11 → 1.0.1Breaking6Platform1Changed1Fixed1

BreakingUpgrade verdict

6 breaking changes and a platform requirement change.

  • The built-in CSS minification switch is gone. Minify CSS with a separate tool instead.
  • The old option name for CSS modules is gone; use the new name.
  • The option controlling camelCase class names was renamed; use the new spelling.
  • The option for resolving root-relative URLs is gone. Handle those URLs with a separate PostCSS plugin.
Top 4 of 7 that need code or config changes

Node.js requirement changed in 1.0.0: >=0.12.0 || >= 4.3.0 < 5.0.0 || >=5.10 → >= 6.9.0 <7.0.0 || >= 8.9.0.

Adds lodash ^4.17.11.

Drops cssnano, lodash.camelcase, object-assign.

Installs 35 packages in all (was 143).

Breaking6
Removes the minimize option; use postcss-loader with cssnano or the optimize-cssnano-plugin instead.
minimize
Removes the module option; use the modules option instead.
modulemodules
Removes the camelcase option; use the camelCase option instead.
camelcasecamelCase
Removes the root option; use postcss-loader with the postcss-url plugin instead.
root
Removes the alias option; use webpack's resolve.alias or postcss-loader with the postcss-url plugin instead.
aliasresolve.alias
Updates postcss to version 6.
postcss
Platform1
Requires Node.js version 6.9 or higher.