We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
routes.match
This can be done in the template (hacked version):
Object.assign( render, withSourceMap(template), ) function withSourceMap(template) { console.log(template) return mapValues(template, x => typeof x === 'function' ? (...args) => withSourceMappedErrorAsync(createMap, () => x(...args)) : x && typeof x === 'object' ? withSourceMap(x) : x ) } function mapValues(x, f) { return Object.entries(x) .map(([k, v]) => [k, f(v, k, x)]) .reduce((result, [k, v]) => ({ ...result, [k]: v }), {}) } ... function withSourceMappedErrorAsync(createMap, fn, options) { return withRawErrorStackAsync(async () => { try { return await fn() } catch (e) { const messageWithStack = e + '\n' + toMappedStack(createMap, e.stack, options) const error = new Error(messageWithStack) error.stack = messageWithStack throw error } }) } async function withRawErrorStackAsync(fn) { const $prepareStackTrace = Error.prepareStackTrace Error.prepareStackTrace = (error, stack) => stack try { return await fn() } finally { Error.prepareStackTrace = $prepareStackTrace } }
Another option would be to call the function with source mapped error from serve.
serve
The text was updated successfully, but these errors were encountered:
No branches or pull requests
This can be done in the template (hacked version):
Another option would be to call the function with source mapped error from
serve
.The text was updated successfully, but these errors were encountered: