Closed ma-jahn closed 2 years ago
Hi @ma-jahn ,
Thanks for filing this issue. I have investigated it and found that the ESM build was faulty. I have published a beta version for you to test out. Could you run npm install contentful-rich-text-vue-renderer@2.2.0-beta.0
and try it out?
Hi @tolgap
I tried this 2.2.0-beta.0 but i get this error on it, running also nuxt3 (3.0.0-rc-6)
Cannot read property 'nodeRenderers' of undefined
Same thing here :/
For Nuxt 3 users: I just published v3.0.1
. It removed a require
statement in index.esm.js
that is in use if ESM is enabled. Should fix this issue. If not, please let me know, I'll reopen.
It works on my end, NUXT3 (3.0.0-rc-6)
Thanks a lot.
Hi,
we were trying to include your RichTextRenderer in our Nuxt 3 App. Unfortunatly it is not yet working.
After adding
import RichText from 'contentful-rich-text-vue-renderer'
we receive the following error:
require is not defined in ES module scope, you can use import instead
Shouldn't the index.esm.js be using
import
instead ofrequire
?When explicity importing the Common JS Build like so:
import RichText from 'contentful-rich-text-vue-renderer/dist/index.cjs'
It's working but this doesn't feel right.Am i missing something?