plasmicapp / plasmic

Visual builder for React. Build apps, websites, and content. Integrate with your codebase.
https://www.plasmic.app
MIT License
4.72k stars 382 forks source link

Next.js: Global CSS cannot be imported from within node_modules #66

Open ryscheng opened 1 year ago

ryscheng commented 1 year ago

I'm trying to create a React library using Plasmic components. This React library will then be published to npm and imported into a separate Next.js application.

Next.js does not support global CSS from node_modules, which prevents me from using the React library. See: https://github.com/vercel/next.js/issues/19936

This is true if I use either the Headless API or Codegen in the React library. I think it's because Plasmic components import the following file globally https://github.com/plasmicapp/plasmic/blob/master/packages/react-web/src/styles/plasmic.css

Would it be difficult to move the necessary CSS somewhere else?