wobsoriano / lexical-vue

An extensible Vue 3 web text-editor based on Lexical.
https://lexical-vue.vercel.app/
MIT License
251 stars 30 forks source link

Is it possible to work with Nuxt3? #4

Closed nsefh closed 1 year ago

nsefh commented 2 years ago

Hello, I really liked the framework.

But there was a need to use with Nuxt3. I am not very versed in JS and do not understand the essence of the error.

I copied the example code into the component, but I get an error: [h3] [unhandled] H3Error: Class extends value undefined is not a constructor or null

wobsoriano commented 2 years ago

h3 error is unrelated to lexical. Do you have a simple reproduction? Try stackblitz

nsefh commented 2 years ago

h3 error is unrelated to lexical. Do you have a simple reproduction? Try stackblitz

Thanks for the answer. https://stackblitz.com/edit/github-rsrbgs?embed=1&file=components/TextEditor.vue

nsefh commented 2 years ago

Accidentally closed the issue. Unfortunately the question is open.

wobsoriano commented 2 years ago

Thanks for the repro! I'll check in a bit

wobsoriano commented 2 years ago

Still investigating what causes the issue

kylegl commented 1 year ago

I was getting this error in vue when I had lexical and lexical-vue installed as dev dependencies. Moved them to dependencies and the error is gone. Not sure if that helps with Nuxt.

wobsoriano commented 1 year ago

Tried it on Nuxt 3.0.0-rc.12 today and got it working. Just wrap your main Editor component in a <ClientOnly /> component.