WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/webpack-extraction-plugin/README.md
+5-2Lines changed: 5 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,7 @@ A plugin for Webpack 5 that performs CSS extraction for [`@griffel/react`](../re
7
7
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
8
8
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
9
9
10
+
10
11
-[Install](#install)
11
12
-[When to use it?](#when-to-use-it)
12
13
-[How it works?](#how-it-works)
@@ -70,7 +71,7 @@ module.exports = {
70
71
},
71
72
},
72
73
// "css-loader" is required to handle produced CSS assets by Griffel
73
-
// you can use "style-loader" or "MiniCssExtractPlugin.loader" to handle CSS insertion
74
+
// you can use "MiniCssExtractPlugin.loader" to handle CSS insertion
74
75
{
75
76
test:/\.css$/,
76
77
use: [MiniCssExtractPlugin.loader, 'css-loader'],
@@ -81,7 +82,9 @@ module.exports = {
81
82
};
82
83
```
83
84
84
-
-`mini-css-extract-plugin` is not mandatory and configured there for example, you can use `style-loader` or other tooling to inject CSS on a page
85
+
-`mini-css-extract-plugin` is not mandatory and configured there for example, you can use other tooling to inject CSS on a page
86
+
87
+
> ⚠️ `style-loader` does not produce necessary assets for the Griffel plugin to order CSS rules correctly. Using it to handle CSS insertion would result in partially broken styling in your app.
85
88
86
89
For better performance (to process less files) consider to use `include` for `GriffelCSSExtractionPlugin.loader`:
0 commit comments