File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -756,6 +756,19 @@ module.exports = {
756
756
};
757
757
```
758
758
759
+ ## How to enable ` @debug ` output
760
+
761
+ Defaults, the output of ` @debug ` messages is disabled.
762
+ To enable it, add to ** webpack.config.js** following:
763
+ ``` js
764
+ module .exports = {
765
+ stats: {
766
+ loggingDebug: [' sass-loader' ],
767
+ },
768
+ // ...
769
+ }
770
+ ```
771
+
759
772
## Examples
760
773
761
774
### Extracts CSS into separate files
Original file line number Diff line number Diff line change @@ -157,13 +157,15 @@ async function getSassOptions(
157
157
const logger = loaderContext . getLogger ( "sass-loader" ) ;
158
158
const formatSpan = ( span ) =>
159
159
`${ span . url || "-" } :${ span . start . line } :${ span . start . column } : ` ;
160
+ const formatDebugSpan = ( span ) =>
161
+ `[debug:${ span . start . line } :${ span . start . column } ] ` ;
160
162
161
163
options . logger = {
162
164
debug ( message , loggerOptions ) {
163
165
let builtMessage = "" ;
164
166
165
167
if ( loggerOptions . span ) {
166
- builtMessage = formatSpan ( loggerOptions . span ) ;
168
+ builtMessage = formatDebugSpan ( loggerOptions . span ) ;
167
169
}
168
170
169
171
builtMessage += message ;
You can’t perform that action at this time.
0 commit comments