outline / rich-markdown-editor

The open source React and Prosemirror based markdown editor that powers Outline. Want to try it out? Create an account:
https://www.getoutline.com
BSD 3-Clause "New" or "Revised" License
2.87k stars 590 forks source link

NextJS fails to compile due to global CSS dependency in node modules #598

Closed gavindoughtie closed 2 years ago

gavindoughtie commented 2 years ago

A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior: Include the rich markdown editor component in a component rendered server-side by nextjs

Expected behavior A clear and concise description of what you expected to happen.

Version 12.0.0-beta.0 (using with React 18 beta)

Screenshots If applicable, add screenshots or videos to help explain your problem.

./node_modules/katex/dist/katex.min.css Global CSS cannot be imported from within node_modules. Read more: https://nextjs.org/docs/messages/css-npm Location: node_modules/rich-markdown-editor/dist/nodes/Math.js

Desktop (please complete the following information):

Smartphone (please complete the following information):

tommoor commented 2 years ago

Please see this issue: https://github.com/outline/rich-markdown-editor/issues/303

The component does not support SSR at this time so you should ensure window is available.