Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Update dependency style-loader to v4 #547

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
renovate wants to merge 1 commit into main
base: main
Choose a base branch
Loading
from renovate/style-loader-4.x

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented Apr 8, 2024
edited
Loading

This PR contains the following updates:

Package Change Age Confidence
style-loader 3.3.44.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 - At any time (no schedule defined), 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 added the 🤖 Automatic Issues/pull requests marked with this label were generated automatically by our helper bots. label Apr 8, 2024
@renovate renovate bot force-pushed the renovate/style-loader-4.x branch 2 times, most recently from d47fe3b to c64e0ac Compare August 13, 2025 16:44
@renovate renovate bot force-pushed the renovate/style-loader-4.x branch from c64e0ac to 856c2c3 Compare August 19, 2025 19:11
@renovate renovate bot force-pushed the renovate/style-loader-4.x branch from 856c2c3 to 29ebd4f Compare August 31, 2025 14:35
@renovate renovate bot force-pushed the renovate/style-loader-4.x branch 3 times, most recently from 97ca9c4 to c776c30 Compare September 30, 2025 05:31
@renovate renovate bot force-pushed the renovate/style-loader-4.x branch from c776c30 to 61d589c Compare October 8, 2025 06:13
@renovate renovate bot force-pushed the renovate/style-loader-4.x branch from 61d589c to e01ca69 Compare October 21, 2025 09:39
@renovate renovate bot force-pushed the renovate/style-loader-4.x branch from e01ca69 to ef26e22 Compare November 11, 2025 02:05
@renovate renovate bot force-pushed the renovate/style-loader-4.x branch from ef26e22 to 6256ebe Compare November 18, 2025 22:36
@renovate renovate bot force-pushed the renovate/style-loader-4.x branch from 6256ebe to ebddf28 Compare December 3, 2025 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Labels

🤖 Automatic Issues/pull requests marked with this label were generated automatically by our helper bots.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

AltStyle によって変換されたページ (->オリジナル) /