Skip to content

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented Jun 5, 2025

This PR contains the following updates:

Package Change Age Confidence
style-loader ^3.3.3 -> ^4.0.0 age confidence

Release Notes

webpack-contrib/style-loader (style-loader)

v4.0.0

Compare Source

⚠ BREAKING CHANGES
  • minimum supported webpack version is 5.27.0
  • minimum support Node.js version is 18.12.0
  • the insert option can only be a selector or the path to the module

Migration:

Before:

webpack.config.js

module.exports = { module: { rules: [ { test: /\.css$/i, use: [ { loader: "style-loader", options: { injectType: "styleTag", styleTagTransform (css, style) { // Do something ... style.innerHTML = `${css}.modify{}\n`; document.head.appendChild(style); }, }, }, "css-loader", ], }, ], }, };

After:

insert-function.js

function insert(css, style) { const parent = options.target || document.head; parent.appendChild(element); } module.exports = insert;

webpack.config.js

module.exports = { module: { rules: [ { test: /\.css$/i, use: [ { loader: "style-loader", options: { insert: require.resolve("./insert.js"), }, }, "css-loader", ], }, ], }, };
  • the styleTagTransform option can only be the path to the module

Migration:

Before:

webpack.config.js

module.exports = { module: { rules: [ { test: /\.css$/i, use: [ { loader: "style-loader", options: { injectType: "styleTag", styleTagTransform (css, style) { // Do something ... style.innerHTML = `${css}.modify{}\n`; document.head.appendChild(style); }, }, }, "css-loader", ], }, ], }, };

After:

style-tag-transform-function.js

function styleTagTransform(css, style) { // Do something ... style.innerHTML = `${css}.modify{}\n`; document.head.appendChild(style); } module.exports = styleTagTransform;

webpack.config.js

module.exports = { module: { rules: [ { test: /\.css$/i, use: [ { loader: "style-loader", options: { styleTagTransform: require.resolve("./style-tag-transform-function.js"), }, }, "css-loader", ], }, ], }, };
Bug Fixes
3.3.3 (2023-05-19)
Bug Fixes
3.3.2 (2023-03-13)
Bug Fixes
3.3.1 (2021-10-21)
Bug Fixes

Configuration

📅 Schedule: Branch creation - Between 12:00 AM and 03:59 AM, on day 1 of the month ( * 0-3 1 * * ) (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot force-pushed the renovate/style-loader-4.x branch from d817e3e to 6f83d01 Compare August 10, 2025 14:09
@renovate renovate bot force-pushed the renovate/style-loader-4.x branch from 6f83d01 to 8e154f7 Compare September 25, 2025 15:40
@renovate renovate bot force-pushed the renovate/style-loader-4.x branch from 8e154f7 to 2729e0c Compare October 21, 2025 10:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

0 participants