Skip to content

Conversation

@prateekbh
Copy link
Member

@prateekbh prateekbh commented Oct 29, 2019

To be merged after: GoogleChromeLabs/critters#45

What kind of change does this PR introduce?
Bug fix

Did you add tests for your changes?
Updated the existing tests

Summary
Critters only inlines the css from the css files actually present in the html.
This was the reason why home page's css was never inlined on http://cli-demo-next.preactjs.com
This PR adds route's css as well as bundle css

Does this PR introduce a breaking change?
No

@prateekbh prateekbh changed the title Inline CSS fixes [WIP]Inline CSS fixes Oct 30, 2019
@prateekbh
Copy link
Member Author

Ahhh problem!
We always pre-render home, which means for someone who points all routes to / there will always be extra css loaded via route-home.chunk.css

@ForsakenHarmony
Copy link
Member

for someone who points all routes to /

wdym?

@prateekbh
Copy link
Member Author

Like deploy to surge and redirect * to /

@ForsakenHarmony
Copy link
Member

Oh you're talking about the backend always serving /index.html, not the route specific html files

@prateekbh
Copy link
Member Author

yep, in that case all routes will download an extra route-home.chunk.xxxxx.css

@prateekbh
Copy link
Member Author

// @developit: ^ request for additional stylesheets options in critters

@prateekbh prateekbh changed the title [WIP]Inline CSS fixes Inline CSS fixes Jan 3, 2020
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

Successfully merging this pull request may close these issues.

4 participants