question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

It doesn't work with Next.js & CSS modules production build

See original GitHub issue

Hi,

I am using next.js with CSS modules and trying to add react-select v4.3.0, but it doesn’t work. On dev enviroemnt styling looks correct as on the image below: image

But after building application with default next build styles completely fails: image

I think that is issue with webpack and hashing styles, but before doing more detailed debugging, I would like to ask if anyone faced this kind of issue?

Best, Piotr

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:7

github_iconTop GitHub Comments

0reactions
mattvb91commented, Aug 24, 2021

@piotrrussw what library did you end up using I cant use this with nextjs / styled components because missing styles

Read more comments on GitHub >

github_iconTop Results From Across the Web

Next.JS using CSS Modules not working as expected
CSS modules are supposed to be locally scoped and applied to their respective elements. From the docs, they export an object of classes...
Read more >
Basic Features: Built-in CSS Support
Next.js supports including CSS files as Global CSS or CSS Modules, using `styled-jsx` for CSS-in-JS, or any other CSS-in-JS solution! Learn more here....
Read more >
module.css not loading styles · Issue #36873 · vercel/next.js
Verify canary release I verified that the issue exists in Next.js ... I'm trying apply module.css to one of my components according to...
Read more >
Css modules seem to not work in production : r/nextjs
Just a quick question regarding css modules and it's integration with nextjs. When building the app on production mode all components…
Read more >
Next.js: The Good, Bad and Ugly - Dhanraj Padmashali
I've been building applications using Next.js for a couple of months ... Issues with Next.js; CSS Modules; Automatic Static Optimization, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found