Skip to content

Upgrading style-loader 3 to 4

Breaking3.3.4 → 4.0.0Breaking4Fixed1

BreakingUpgrade verdict

4 breaking changes.

  • The insert option no longer accepts a function written directly in the config; you must point it to a separate module file instead.
  • The styleTagTransform option no longer accepts a function written directly in the config; you must point it to a separate module file instead.
  • You need a newer version of webpack (at least 5.27.0) to use this release.
  • You need Node.js 18.12.0 or newer to use this release.
Top 3 of 4 that need code or config changes

Node.js requirement changed in 4.0.0: >= 12.13.0 → >= 18.12.0.

Breaking4
Restricts the insert option to a selector or a module path, removing inline function support.
insert
Restricts the styleTagTransform option to a module path, removing inline function support.
styleTagTransform
Raises the minimum supported webpack version to 5.27.0.
Raises the minimum supported Node.js version to 18.12.0.