Preact-cli: Critical css + styled-components + prerender

Created on 26 Apr 2018  路  2Comments  路  Source: preactjs/preact-cli

Do you want to request a feature or report a bug?
Informations and maybe a feature..

What is the current behaviour?
The pre-render does not insert critical css in the head, even though styled-components does that out of the box. And since preact-cli-plugin-critical-css is using the npm module critcalCss under the hood, it won't work with styled-components because the css files is basically empty.

If this is a feature request, what is motivation or use case for changing the behaviour?
During the pre-render phase, maybe it should take into account if there is styled associated to the component?

At the moment I wonder if my only options is to go with a SSR solution or to go back using css files + preact-cli-plugin-critical-css plugins..

Thanks :)

has-fix maybe stale

Most helpful comment

I have some stuff coming for this (can't give specifics yet!)

All 2 comments

I have some stuff coming for this (can't give specifics yet!)

You said too much! :D

Can't wait then :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

hardcoar picture hardcoar  路  3Comments

ajay28kumar picture ajay28kumar  路  3Comments

higimo picture higimo  路  3Comments

oren picture oren  路  3Comments

raphaelbauer picture raphaelbauer  路  3Comments