Skip to content

Commit f9cc7ba

Browse files
docs: note about css modules
1 parent c4037b0 commit f9cc7ba

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ A loader for webpack which transforms CSS files into JS module.
1919
The `css-loader` interprets `@import` and `url()` like `import/require()` and will resolve them.
2020

2121
Good loaders for requiring your assets are the [file-loader](https://github.com/webpack/file-loader)
22-
and the [url-loader](https://github.com/webpack/url-loader) which you should specify in your config (see [below](https://github.com/webpack-contrib/css-loader#assets)).
22+
and the [url-loader](https://github.com/webpack/url-loader) which you should specify
23+
in your config (see [below](https://github.com/webpack-contrib/css-loader#assets)).
24+
25+
> ⚠️ **CSS Module users should continue using `v1.0.0` in the meantime**
2326
2427
## Requirements
2528

@@ -256,9 +259,10 @@ module.exports = {
256259
{
257260
test: /\.css$/,
258261
use: [
259-
{
260-
loader: MiniCssExtractPlugin.loader,
261-
},
262+
// fallback to style-loader in development
263+
process.env.NODE_ENV !== 'production'
264+
? 'style-loader'
265+
: MiniCssExtractPlugin.loader,
262266
'css-loader',
263267
],
264268
},

0 commit comments

Comments
 (0)