SSR/Prerendering support for styled-components
in Preact CLI.
Inlines extracted styles for your app into the HTML automatically, for all routes.
Install: npm i -D gist:e5c5de7cdbf
... then add to your preact.config.js
:
export default {
plugins: [
'preact-cli-plugin-styled-ssr'
]
};
or via manual configuration
import styledSsr from 'preact-cli-plugin-styled-ssr';
export default function (config, env, helpers) {
styledSsr(config, env);
}