Skip to content
New issue

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

Does Nuxt fully support the latest Vue Functional Components? #2565

Closed
pxwee5 opened this issue Jan 12, 2018 · 6 comments
Closed

Does Nuxt fully support the latest Vue Functional Components? #2565

pxwee5 opened this issue Jan 12, 2018 · 6 comments
Labels

Comments

@pxwee5
Copy link

pxwee5 commented Jan 12, 2018

As per topic. Because I tried

<template functional>
  <div>Test Functional</div>
</template>

When I do a page refresh, I got this error _vm._ssrNode is not a function

Not sure what I'm doing wrong. If someone could point me in the right direction it will be great.

This bug report is available on Nuxt.js community (#c2230)
@mouafa
Copy link

mouafa commented 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

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
Copy link

timwis commented Feb 16, 2018

@mouafa doesn't that have a side-effect of...not optimizing SSR for vue component files, including non-functional ones?

@mouafa
Copy link

mouafa commented Feb 19, 2018

@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.

yyx990803 added a commit to vuejs/vue that referenced this issue Mar 8, 2018
This was referenced Mar 14, 2018
@manniL
Copy link
Member

manniL commented Aug 8, 2018

Should work in the latest nuxt-edge (and IIRC in the latest nuxt) version

@ghost
Copy link

ghost commented Aug 8, 2018

This bug-report has been fixed by @manniL.

Should work in latest nuxt-edge release (possibly in latest nuxt release, v1.4.2 too)

@ghost ghost closed this as completed Aug 8, 2018
@ghost ghost added the cmty:status:fixed label Aug 8, 2018
@lock
Copy link

lock bot commented Nov 1, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Nov 1, 2018
@danielroe danielroe added the 2.x label Jan 18, 2023
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants