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

Preload fonts #7

Closed
Munter opened this issue Jan 28, 2019 · 5 comments
Closed

Preload fonts #7

Munter opened this issue Jan 28, 2019 · 5 comments
Assignees
Labels
help wanted Extra attention is needed

Comments

@Munter
Copy link

Munter commented Jan 28, 2019

A big detractor for rendering performance is the flash of invisible text in the period between first paint and webfonts being loaded.

This period can be reduced with <link rel="preload"> for the require web fonts, or other more complex optimizations can be achieved with fontfaceobserver, automated font subsetting, font-display etc.

To keep performance high when user start building new content from this scaffold, it would be very helpful if the template came with an already existing optimization strategy

@tr1s tr1s self-assigned this Jan 28, 2019
@tr1s
Copy link
Owner

tr1s commented Jan 29, 2019

Will look into preload-webpack-plugin this week.

@tr1s tr1s added the help wanted Extra attention is needed label Jan 29, 2019
@tr1s
Copy link
Owner

tr1s commented Jan 29, 2019

@Munter No luck.

I've tried and made an issue over at preload-webpack-plugin issues so we'll see what they say.

If anyone reading this would like to try and see what I'm doing wrong, that'd be great!

@Munter
Copy link
Author

Munter commented Jan 30, 2019

The case of preloading deep dependency graph elements is indeed not one that fits super well into the webpack plugin ecosystem. At least not while html is still treated as a templating string.

I built a tool to solve this problem outside of webpack. It's called subfont. But since it doesn't fit right into webpack, and instead has to be run as a post-process after webpack, I'm unsure of whether the tool fits into the flow you are trying to scaffold

@tr1s
Copy link
Owner

tr1s commented Jan 30, 2019

Alright, thanks. I'll keep this open until I get a response on the other end.

@tr1s
Copy link
Owner

tr1s commented Jan 31, 2019

Done and done!

@tr1s tr1s closed this as completed Jan 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants