mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-11-30 15:42:49 +03:00
891ab6ab51
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [style-loader](https://togithub.com/webpack-contrib/style-loader) | [`^3.3.4` -> `^4.0.0`](https://renovatebot.com/diffs/npm/style-loader/3.3.4/4.0.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/style-loader/4.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/style-loader/4.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/style-loader/3.3.4/4.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/style-loader/3.3.4/4.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>webpack-contrib/style-loader (style-loader)</summary> ### [`v4.0.0`](https://togithub.com/webpack-contrib/style-loader/blob/HEAD/CHANGELOG.md#400-2024-04-08) [Compare Source](https://togithub.com/webpack-contrib/style-loader/compare/v3.3.4...v4.0.0) ##### ⚠ 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** ```js module.exports = { module: { rules: [ { test: /\.css$/i, use: [ { loader: "style-loader", options: { injectType: "styleTag", styleTagTransform: function (css, style) { // Do something ... style.innerHTML = `${css}.modify{}\n`; document.head.appendChild(style); }, }, }, "css-loader", ], }, ], }, }; ``` After: **insert-function.js** ```js function insert(css, style) { var parent = options.target || document.head; parent.appendChild(element); } module.exports = insert; ``` **webpack.config.js** ```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** ```js module.exports = { module: { rules: [ { test: /\.css$/i, use: [ { loader: "style-loader", options: { injectType: "styleTag", styleTagTransform: function (css, style) { // Do something ... style.innerHTML = `${css}.modify{}\n`; document.head.appendChild(style); }, }, }, "css-loader", ], }, ], }, }; ``` After: **style-tag-transform-function.js** ```js function styleTagTransform(css, style) { // Do something ... style.innerHTML = `${css}.modify{}\n`; document.head.appendChild(style); } module.exports = styleTagTransform; ``` **webpack.config.js** ```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 - css experiments logic ([#​617](https://togithub.com/webpack-contrib/style-loader/issues/617)) ([8b9fc97]( |
||
---|---|---|
.. | ||
@types/env | ||
bump-blocksuite | ||
cli | ||
commitlint | ||
workers |