Skip to content

Commit

Permalink
Improve warning output (#57)
Browse files Browse the repository at this point in the history
Improves the output of a warning to include the file path and the location
  • Loading branch information
adrianbruntonsagecom authored Mar 11, 2024
1 parent da9e8e9 commit b196730
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/parse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ export const parse: Parser<Root | Document> = (
}) as Root;
} catch (err) {
if (err instanceof CssSyntaxError) {
const line = node.loc ? ` (Line ${node.loc.start.line})` : '';
const line = node.loc ? ` (${opts?.from ?? 'unknown'}:${node.loc.start.line})` : opts?.from;

console.warn(
'[postcss-lit]',
Expand Down

0 comments on commit b196730

Please sign in to comment.