Skip to content

Commit

Permalink
feat: add stack info when printing deprecation warning (#91)
Browse files Browse the repository at this point in the history
  • Loading branch information
just-boris authored Sep 2, 2024
1 parent 09d2509 commit 064178a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/build/tasks/style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,11 @@ function createCompiler(inlines: InlineStylesheet[], outputDir: string, sassDir:
const sassResult = sass.compile(input, {
logger: {
warn(message, meta) {
const fullMessage = [message, meta.stack].join('\n');
if (meta.deprecation && options.failOnDeprecations) {
deprecations.push(message);
deprecations.push(fullMessage);
} else {
console.warn(message);
console.warn(fullMessage);
}
},
},
Expand Down

0 comments on commit 064178a

Please sign in to comment.