You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@pxwee5 try to add the current snippet to your nuxt.config.js and make sure you're not lazy loading them otherwise you'll encounter this #2841
build: {
extend(config) {
//fix for _vm._ssrNode is not a function for functional component
config.module.rules.forEach(rule => {
if (rule.test.toString() === '/\\.vue$/') {
rule.options.optimizeSSR = false
}
})
}
}
@timwis I'm not sure, the documentation description says
Enable Vue 2.4 SSR compilation optimization that compiles part of the vdom trees returned by render functions into plain strings, which improves SSR performance. In some cases you might want to explicitly turn it off because the resulting render functions can only be used for SSR and cannot be used for client-side rendering or testing.
But since we're generating a static site this might only affect the build time.
Activity
mouafa commentedon Feb 16, 2018
@pxwee5 try to add the current snippet to your nuxt.config.js and make sure you're not lazy loading them otherwise you'll encounter this #2841
timwis commentedon Feb 16, 2018
@mouafa doesn't that have a side-effect of...not optimizing SSR for vue component files, including non-functional ones?
mouafa commentedon Feb 19, 2018
@timwis I'm not sure, the documentation description says
But since we're generating a static site this might only affect the build time.
fix: install ssr helpers for functional context during SSR
40 remaining items