-
Is it possible to preload webfonts? |
Beta Was this translation helpful? Give feedback.
Answered by
mbabker
Jun 24, 2022
Replies: 1 comment 1 reply
-
Yes. I'm doing it in https://github.com/BabDev/babdev.com/blob/production/app/Http/Middleware/PreloadAssets.php |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
it-can
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yes.
PushManager::preload(asset('fonts/BPscript.woff2'), ['as' => 'font', 'type' => 'font/woff2']);
I'm doing it in https://github.com/BabDev/babdev.com/blob/production/app/Http/Middleware/PreloadAssets.php