mirror of
https://github.com/nuxt/nuxt.git
synced 2025-02-17 06:01:34 +00:00
Add debug for redirect on ssr
This commit is contained in:
parent
d63b34de78
commit
2f2eaac299
@ -59,6 +59,10 @@ export default context => {
|
||||
Component._Ctor = Component
|
||||
Component.extendOptions = Component.options
|
||||
}
|
||||
// For debugging purpose
|
||||
if (!Component.options.name && Component.options.__file) {
|
||||
Component.options.name = Component.options.__file
|
||||
}
|
||||
resolve(Component)
|
||||
}
|
||||
Component().then(_resolve).catch(reject)
|
||||
|
@ -71,6 +71,10 @@ export function render (req, res) {
|
||||
return html
|
||||
})
|
||||
.catch((err) => {
|
||||
if (context.redirected) {
|
||||
console.error(err) // eslint-disable-line no-console
|
||||
return err
|
||||
}
|
||||
const html = this.errorTemplate({
|
||||
error: err,
|
||||
stack: ansiHTML(encodeHtml(err.stack))
|
||||
|
Loading…
Reference in New Issue
Block a user