egoist / rollup-plugin-postcss

Seamless integration between Rollup and PostCSS.
MIT License
675 stars 215 forks source link

Nextjs support: The server side rendering of components is making it unstyled. #453

Open adarsh-drishya opened 1 year ago

adarsh-drishya commented 1 year ago

the classes itself are not getting rendered

jeanbenoit-richez commented 6 months ago

Hi, I got the exact same problem. Did you succeed the make it works ?

jhunter-motorway commented 4 months ago

try this: https://stackoverflow.com/questions/77251063/how-to-use-styled-components-with-rollup-and-next-js-css-not-imported

jeanbenoit-richez commented 4 months ago

The solution si to put:

use 'client';

At the begining of every of your components file at building. You can succeed this with rollup-banner plugins