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

Inline the CSS for improved first paint performance #81

Merged
merged 3 commits into from Sep 30, 2020

Conversation

olpeh
Copy link
Member

@olpeh olpeh commented Sep 25, 2020

Needed to upgrade the Next.js version in order to use the new getCssLinks that gets allFiles passed to it.

Workaround for missing built-in support for inlining CSS copied from here: vercel/next-plugins#238 (comment)

Before:
image

https://webpagetest.org/result/200925_64_4defcc6836fa2ca04c1c5b6fda6567c6/

After:
image

https://webpagetest.org/result/200925_PH_aebda69748a23f2e3b384408623c94ae/

@olpeh
Copy link
Member Author

olpeh commented Sep 26, 2020

The CSS is not minified for some reason

Possibly the CSS was not minified due to this
@rikukissa rikukissa merged commit 0eba06f into koodiklinikka:master Sep 30, 2020
@olpeh olpeh deleted the inline-css branch October 1, 2020 15:46
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.

None yet

2 participants