fix: add empty stack to `CompileDiagnostic` to show error on build

pull/13942/head
paoloricciuti 2 years ago
parent da1fefcd45
commit e967dc8657

@ -0,0 +1,5 @@
---
'svelte': patch
---
fix: add empty stack to `CompileDiagnostic` to show error on build

@ -39,6 +39,7 @@ function get_code_frame(source, line, column) {
* @typedef {{
* code: string;
* message: string;
* stack: string;
* filename?: string;
* start?: Location;
* end?: Location;
@ -50,6 +51,7 @@ function get_code_frame(source, line, column) {
/** @implements {ICompileDiagnostic} */
export class CompileDiagnostic {
name = 'CompileDiagnostic';
stack = '';
/**
* @param {string} code

@ -20,6 +20,7 @@ export default test({
^`,
message: 'Unexpected end of input',
name: 'CompileError',
stack: '',
position: [30, 30],
start: {
character: 30,

Loading…
Cancel
Save