File tree Expand file tree Collapse file tree 1 file changed +9
-33
lines changed Expand file tree Collapse file tree 1 file changed +9
-33
lines changed Original file line number Diff line number Diff line change @@ -23,22 +23,25 @@ Use the loader either via your webpack config, CLI or inline.
23
23
24
24
** webpack.config.js**
25
25
``` js
26
+ const sourceMap = true ;
27
+
26
28
module .exports = {
29
+ devtool: sourceMap && ' source-map' ,
27
30
module: {
28
31
rules: [
29
32
{
30
33
test: / \. css$ / ,
31
34
use: [
32
35
' 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',
36
41
// or with config
37
42
{
38
43
loader: ' group-css-media-queries-loader' ,
39
- options: {
40
- sourceMap: true
41
- }
44
+ options: { sourceMap }
42
45
}
43
46
]
44
47
}
@@ -47,35 +50,8 @@ module.exports = {
47
50
}
48
51
```
49
52
50
-
51
-
52
53
## Options
53
54
54
55
#### __ ` sourceMap ` __ boolean ` true ` or ` false `
55
56
56
57
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
- ```
You can’t perform that action at this time.
0 commit comments