-
Notifications
You must be signed in to change notification settings - Fork 55
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
Each transpiled file includes its own copy of styles instead of a static reference #366
Labels
Comments
TomNUSDS
added a commit
that referenced
this issue
Jul 15, 2021
Fix for issue #366 SSR means "server side rendering". This fix is from a long github discussion about how broken including all css inline in the file is. (Especially since newer CSP guidelines say all css should be in a separate file.)
TomNUSDS
added a commit
that referenced
this issue
Jul 17, 2021
Fix for issue #366 * Create gatsby-ssr.js Note: SSR means "server side rendering". This fix is from a long github discussion about how broken including all css inline in the file is. (Especially since newer CSP guidelines say all css should be in a separate file.) * PR code review fixes * Check el.props['data-href'] is valid * Add comment for production only.
hi @TomNUSDS! I see this is in Design column. Not sure from this bug description and history if this specifically needs Design input right now, and if so what that input is? |
This was purely an dev issue. It was just a bit inefficient in generating the html/css. |
switzersc-usds
changed the title
Each transpiled file includes it's own copy of styles instead of a static reference
Each transpiled file includes its own copy of styles instead of a static reference
Jul 27, 2021
Fixed! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
There is something wrong with our build. CSS styles should be referenced in an external css file not embedded in each file. This is making the file very large.
To Reproduce
Steps to reproduce the behavior:
gatsby clean
gatsby build
prettier --write ./public/
to reformat "compressed" content.index.html
filesResult: each file has 21k lines of css in it.
Expected behavior
The css should be referenced via a external file. eg.
<link type="text/css" rel="stylesheet" href="...">
The text was updated successfully, but these errors were encountered: