'Nextjs css loading bug after building

I am building a Nextjs application using typescript. I import css with the '[name].module.css' Everything works fine, but after building it I miss the styling on one class. I tried renaming the class, but that had no effect. When I put the class styling to the bodem of the css file it worked. But now it is another class that is not loading the css.

After a while I tried putting the css inside the component's .tsx file like

<style jsx>[COMPONENTS STYLING]</style>.

This component renders all the css, but now there is another component where the problem occurs.

Expected result: output of the contentblock

styling of the contentblock

Results I am getting after building: output of the content block after build
missing styling after build

I can not make an issue on https://github.com/vercel/next.js/ because I can not reproduce the problem i am facing.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source