fix(nitro): disable automatic spa fallback (#1071)

This commit is contained in:
Daniel Roe 2021-10-18 09:08:22 +01:00 committed by GitHub
parent 70f1483f9e
commit 61518a972f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -42,10 +42,7 @@ const getSPARenderer = cachedResult(async () => {
function renderToString (ssrContext) {
const getRenderer = (NUXT_NO_SSR || ssrContext.noSSR) ? getSPARenderer : getSSRRenderer
return getRenderer().then(renderToString => renderToString(ssrContext)).catch((err) => {
console.warn('Server Side Rendering Error:', err)
return getSPARenderer().then(renderToString => renderToString(ssrContext))
})
return getRenderer().then(renderToString => renderToString(ssrContext))
}
export async function renderMiddleware (req, res: ServerResponse) {