Skip to content

Commit

Permalink
feat: emit @warning as webpack warning (#1054)
Browse files Browse the repository at this point in the history
BREAKING CHANGES: emit `@warn` at-rules as webpack warnings (only for `dart-sass` and `sass-embedded`), behaviour can be changed using the `warnRuleAsWarning` option
  • Loading branch information
alexander-akait authored May 17, 2022
1 parent 06d7533 commit 58ffb68
Show file tree
Hide file tree
Showing 4 changed files with 467 additions and 405 deletions.
4 changes: 1 addition & 3 deletions src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,7 @@ async function getSassOptions(
: content;

if (!options.logger) {
// TODO set me to `true` by default in the next major release
const needEmitWarning = loaderOptions.warnRuleAsWarning === true;

const needEmitWarning = loaderOptions.warnRuleAsWarning !== false;
const logger = loaderContext.getLogger("sass-loader");
const formatSpan = (span) =>
`${span.url || "-"}:${span.start.line}:${span.start.column}: `;
Expand Down
Loading

0 comments on commit 58ffb68

Please sign in to comment.