gatsbyjs / gatsby

The best React-based framework with performance, scalability and security built in.
https://www.gatsbyjs.com
MIT License
55.26k stars 10.32k forks source link

Class name of css-in-js overwritten after run build & serve #18547

Closed gengengengengen closed 4 years ago

gengengengengen commented 5 years ago

Summary

Please forgive my pool English.

I am using the injectSheet HOC of 'react-jss' to styling my components.

When I run server in development mode, everything look good and class names between jss and elements are matched: image image

But when I run build & serve, the page shows wrong styles. The class names of jss become different from development mode: image image

This issue is similar to #8560 but the solutions in that issue didn't work with me.

Thanks a lot.

Relevant information

Environment

System: OS: Windows 10 CPU: (4) x64 Intel(R) Core(TM) i5-7300U CPU @ 2.60GHz Binaries: Node: 10.16.3 - C:\nodejs\node.EXE Yarn: 1.19.0 - C:\Program Files (x86)\Yarn\bin\yarn.CMD npm: 6.9.0 - C:\nodejs\npm.CMD Browsers: Edge: 44.18362.387.0 npmPackages: gatsby: ^2.15.33 => 2.15.35 gatsby-image: ^2.2.24 => 2.2.27 gatsby-plugin-manifest: ^2.2.20 => 2.2.21 gatsby-plugin-offline: ^3.0.12 => 3.0.14 gatsby-plugin-react-helmet: ^3.1.10 => 3.1.11 gatsby-plugin-sharp: ^2.2.28 => 2.2.29 gatsby-source-filesystem: ^2.1.30 => 2.1.31 gatsby-transformer-sharp: ^2.2.20 => 2.2.21

File contents

gatsby-config.js: N/A package.json: N/A gatsby-node.js: N/A gatsby-browser.js: N/A gatsby-ssr.js: N/A

gatsbot[bot] commented 4 years ago

Hiya!

This issue has gone quiet. Spooky quiet. 👻

We get a lot of issues, so we currently close issues after 30 days of inactivity. It’s been at least 20 days since the last update here.

If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not stale" to keep this issue open!

As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!

Thanks for being a part of the Gatsby community! 💪💜

gatsbot[bot] commented 4 years ago

Hey again!

It’s been 30 days since anything happened on this issue, so our friendly neighborhood robot (that’s me!) is going to close it.

Please keep in mind that I’m only a robot, so if I’ve closed this issue in error, I’m HUMAN_EMOTION_SORRY. Please feel free to reopen this issue or create a new one if you need anything else.

As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!

Thanks again for being part of the Gatsby community!

daniyals14 commented 4 years ago

i can replicate the same issue