Skip to content

Global CSS import within the package is causing an issue with Next.js #42

Closed
@imbhargav5

Description

@imbhargav5

When using this component with Next.js, I am facing this error. Specifically at lines like these.


error - ./node_modules/@uiw/react-markdown-editor/lib/esm/components/CodeMirror/codemirror.css
Global CSS cannot be imported from within node_modules.
Read more: https://err.sh/next.js/css-npm

Perhaps we can expose an export that is unstyled and one that is styled?

  1. Expose UnstyledComponents
...
export default UnstyledComponent
  1. Expose a module which has styles also imported.
import UnstyledComponent from ...
import styles from ...

export default ...

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