Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken css after build #4754

Closed
ponchique opened this issue Mar 29, 2018 · 5 comments
Closed

Broken css after build #4754

ponchique opened this issue Mar 29, 2018 · 5 comments

Comments

@ponchique
Copy link

Hi there!

Can't find a css for static pages, after gatsby build.
This behavior I see only if I reload all existing pages in a browser, but if I'm roaming through site links -
css is working.
Also, css works in the dev mode

There are no errors in console, no errors while building, just as the result - broken css and from time to time they looks different.

Environment

  • gatsby-cli version:1.9.243
  • Node.js version: 8.9.4
  • Operating System: MacOS 10.13.2

File contents :

gatsby-config.js:

+ `gatsby-plugin-jss`,

Would be thankful if you can help me!

@ajayns
Copy link
Contributor

ajayns commented Apr 6, 2018

I believe you have the same error as I encountered in #4183
Do check out the issue and take the required steps in adding the styling in html.js for production

@ajayns
Copy link
Contributor

ajayns commented Apr 6, 2018

@KyleAMathews Don't you think it would be a good idea mentioning this somewhere in the documentation? Because devs usually just check how good everything works using gatsby develop and then gatsby build seems to break everything just like that.

@KyleAMathews
Copy link
Contributor

If you use the default html.js (which we strongly encourage you to) then this happens by default.

@ajayns
Copy link
Contributor

ajayns commented Apr 8, 2018

@ponchique Is your issue resolved?

@ponchique
Copy link
Author

ponchique commented Apr 16, 2018

Yes, I resolved it by rewriting all css using sass. I thought the problem was in jss.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants