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

Issue with CSS after upgrading to CRA2 #274

Closed
alan345 opened this issue Oct 16, 2018 · 10 comments
Closed

Issue with CSS after upgrading to CRA2 #274

alan345 opened this issue Oct 16, 2018 · 10 comments

Comments

@alan345
Copy link

alan345 commented Oct 16, 2018

Before upgrading to CRA2, it was working well.
Now. Css is not loaded correctly.
I have tried with and without option "inlineCss": true.
Here you have the result with react-snap:
image
without react-snap:
image
I am using:
"react": "16.5.2"
"@material-ui/core": "3.2.0",
Let me know if you have an idea how I can dig into this issue.
Thanks!

@stereobooster
Copy link
Owner

stereobooster commented Oct 16, 2018

Can you post more info. Exact version of CRA and exact config of react-snap.

Do you use INLINE_RUNTIME_CHUNK=false?

@alan345
Copy link
Author

alan345 commented Oct 16, 2018

yes sure:
"react-scripts": "2.0.5"
"react-snap": "^1.19.0",

@alan345 alan345 closed this as completed Oct 16, 2018
@alan345 alan345 reopened this Oct 16, 2018
@alan345
Copy link
Author

alan345 commented Oct 16, 2018

no I don't use INLINE_RUNTIME_CHUNK=false

@stereobooster
Copy link
Owner

You should use INLINE_RUNTIME_CHUNK=false with CRA2 until we get better solution

@alan345
Copy link
Author

alan345 commented Oct 16, 2018

Same issue..

  "reactSnap": {
    "fixWebpackChunksIssue": false,
    "puppeteerIgnoreHTTPSErrors": true,
    "inlineCss": true,
    "INLINE_RUNTIME_CHUNK":false    
  },

@stereobooster
Copy link
Owner

try this

INLINE_RUNTIME_CHUNK=false yarn build
"reactSnap": {
  "puppeteerIgnoreHTTPSErrors": true
}

@alan345
Copy link
Author

alan345 commented Oct 16, 2018

also not working..

The behavior is weird, after I refresh, css is ok (static files), then it fires a query and then it looks like css is not fully loaded:
https://j.gifs.com/rRLDX2.gif
issue is only for chrome. (Safari and android chrome are working..)

@stereobooster
Copy link
Owner

I guess you have issue with JSS similar too #99 (comment)

@stereobooster
Copy link
Owner

Feel free to reopen, if you have more questions

@swoppy
Copy link

swoppy commented Jun 27, 2020

I have the same issue, I'm using CRA 3 with typescript and CSS Module. It messed up the layout, some HTML tags are even missing after this whole process.

config

"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-scripts": "3.4.1",
"react-snap": "^1.23.0"
"reactSnap": {
    "fixWebpackChunksIssue": false,
    "puppeteerIgnoreHTTPSErrors": true,
    "inlineCss": true,
    "puppeteerArgs": [
      "--no-sandbox",
      "--disable-setuid-sandbox"
    ]
  },

even did this INLINE_RUNTIME_CHUNK=false yarn build to build

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