Skip to content

Commit b43a8c7

Browse files
author
David Narbutovich
authored
Update README.md
1 parent c3e4309 commit b43a8c7

File tree

1 file changed

+9
-33
lines changed

1 file changed

+9
-33
lines changed

README.md

Lines changed: 9 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -23,22 +23,25 @@ Use the loader either via your webpack config, CLI or inline.
2323

2424
**webpack.config.js**
2525
```js
26+
const sourceMap = true;
27+
2628
module.exports = {
29+
devtool: sourceMap && 'source-map',
2730
module: {
2831
rules: [
2932
{
3033
test: /\.css$/,
3134
use: [
3235
'style-loader',
33-
'css-loader',
34-
35-
'group-css-media-queries-loader',
36+
{
37+
loader: 'css-loader',
38+
options: { sourceMap }
39+
},
40+
// 'group-css-media-queries-loader',
3641
// or with config
3742
{
3843
loader: 'group-css-media-queries-loader',
39-
options: {
40-
sourceMap: true
41-
}
44+
options: { sourceMap }
4245
}
4346
]
4447
}
@@ -47,35 +50,8 @@ module.exports = {
4750
}
4851
```
4952

50-
51-
5253
## Options
5354

5455
#### __`sourceMap`__ boolean `true` or `false`
5556

5657
Enable CSS source maps.
57-
58-
59-
60-
**In your application**
61-
```js
62-
import css_min from 'style.css';
63-
```
64-
65-
#### CLI
66-
67-
```bash
68-
webpack --module-bind 'css=style-loader!css-loader!group-css-media-queries-loader'
69-
```
70-
71-
**In your application**
72-
```js
73-
import css_min from 'style.css';
74-
```
75-
76-
#### Inline
77-
78-
**In your application**
79-
```js
80-
import css_min from 'style-loader!css-loader!group-css-media-queries-loader!./style.css';
81-
```

0 commit comments

Comments
 (0)