Static GitHub Issues

[3227] custom class instance returned by asyncdata

prev: Cannot find module './1523814304790.jpg'
next: nuxt-typescript example has `vue is not defined` error

Version

nuxt-edge

Reproduction link

https://github.com/syffs/nuxt-asyncdata-class-instance-issue

Steps to reproduce

see the repro link: is there some workaround to make this work?

ssr works well, but client rendering fails (as methods are undefined)

all the hooks beforeCreate, created, mounted in the world are unfortunately unhelpful here, because computed property gets somehow called before

What is expected ?

being able to pass a class instance somehow

What is actually happening?

SSR JSON serialization ignores all the methods, but I'm unable to reinstate the class instance on client side with some hook.

Additional comments?

it is not really a bug, but cmty questions are ignored.

<!--cmty--><div align="right"><sub><em>This bug report is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c6906">#c6906</a>)</em></sub></div>