Update src/compiler/compile/Component.ts

pull/8362/head
Ben McCann 3 years ago committed by GitHub
parent 1533c9f5c7
commit 741032195c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -143,6 +143,7 @@ export default class Component {
.replace(process.cwd(), '') .replace(process.cwd(), '')
.replace(regex_leading_directory_separator, '') .replace(regex_leading_directory_separator, '')
: compile_options.filename); : compile_options.filename);
// line numbers in stack trace frames are 1-based. source maps are 0-based
const locator = getLocator(this.source, { offsetLine: 1 }); const locator = getLocator(this.source, { offsetLine: 1 });
// @ts-ignore - fix the type of CompileOptions.sourcemap // @ts-ignore - fix the type of CompileOptions.sourcemap
const tracer = compile_options.sourcemap ? new TraceMap(compile_options.sourcemap) : undefined; const tracer = compile_options.sourcemap ? new TraceMap(compile_options.sourcemap) : undefined;

Loading…
Cancel
Save