rollup-plugin-postcss icon indicating copy to clipboard operation
rollup-plugin-postcss copied to clipboard

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

Open adarsh-drishya opened this issue 2 years ago • 3 comments

the classes itself are not getting rendered

adarsh-drishya avatar Sep 21 '23 03:09 adarsh-drishya

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

jeanbenoit-richez avatar Mar 26 '24 11:03 jeanbenoit-richez

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

jhunter-motorway avatar May 15 '24 18:05 jhunter-motorway

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

jeanbenoit-richez avatar May 17 '24 10:05 jeanbenoit-richez