Skip to content

Commit

Permalink
fix: add frame property to compile errors (#2303)
Browse files Browse the repository at this point in the history
  • Loading branch information
rturnq authored Sep 26, 2024
1 parent 93a767e commit e6d117b
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 e6d117b

Please sign in to comment.