Skip to content

Commit a5fdf84

Browse files
ndresxmichael-ciniawsky
authored andcommitted
docs(README): improve importLoaders section and example (#512)
1 parent 2fa64fd commit a5fdf84

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -390,22 +390,22 @@ import { className } from 'file.css';
390390

391391
### `importLoaders`
392392

393-
The query parameter `importLoaders` allow to configure which loaders should be applied to `@import`ed resources.
394-
395-
`importLoaders`: That many loaders after the css-loader are used to import resources.
393+
The query parameter `importLoaders` allows to configure how many loaders before `css-loader` should be applied to `@import`ed resources.
396394

397395
**webpack.config.js**
398396
```js
399397
{
400398
test: /\.css$/,
401399
use: [
400+
'style-loader',
402401
{
403402
loader: 'css-loader',
404403
options: {
405-
importLoaders: 1
404+
importLoaders: 1 // 0 => no loaders (default); 1 => postcss-loader; 2 => postcss-loader, sass-loader
406405
}
407406
},
408-
'postcss-loader'
407+
'postcss-loader',
408+
'sass-loader'
409409
]
410410
}
411411
```

0 commit comments

Comments
 (0)