Skip to content

require is not defined in ES module scope, you can use import instead #42

@ma-jahn

Description

@ma-jahn

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 of require ?

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions