Skip to content

Commit

Permalink
fix: add frame property to compile errors
Browse files Browse the repository at this point in the history
  • Loading branch information
rturnq committed Sep 25, 2024
1 parent 93a767e commit f5ff508
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .changeset/nine-kids-divide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@marko/compiler": patch
"marko": patch
---

Add frame property to compile errors
6 changes: 6 additions & 0 deletions packages/compiler/src/util/build-code-frame.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ class CompileError extends Error {
writable: true,
configurable: true,
},
frame: {
value: prettyMessage,
enumerable: false,
writable: true,
configurable: true,
},
// Ignore some mutations from Babel.
code: {
enumerable: false,
Expand Down

0 comments on commit f5ff508

Please sign in to comment.