webpack - 如何使用字体显示:交换;用于roboto字体类星体应用
问题描述
解决方案
注释掉并将其添加到您'roboto-font'
的:extras
index.template.html
<link rel="preconnect" href="https://fonts.gstatic.com">
<link rel="preload" href="https://fonts.googleapis.com/css2?family=Roboto:wght@100;300;400;500;700;900&display=swap" as="style" onload="this.onload=null;this.rel='stylesheet'">
<noscript><link href="https://fonts.googleapis.com/css2?family=Roboto:wght@100;300;400;500;700;900&display=swap" rel="stylesheet"></noscript>
如果您仅添加字体链接,Lighthouse 将为您提供的“消除渲染阻塞资源”的额外代码:
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@100;300;400;500;700;900&display=swap" rel="stylesheet">
https://web.dev/render-blocking-resources/?utm_source=lighthouse&utm_medium=devtools
推荐阅读
- ios - iOS14 中的 UIViewControllerRepresentable 和属性包装器行为,与 CropViewController 一起使用
- android - 是否可以为 Android 上的 Outlook Mobile 构建针对本地 Exchange 部署运行的 Outlook 插件
- node.js - 找不到“AppModule”Angular 10 的 NgModule 元数据中的错误
- google-chrome-extension - Chrome 扩展新手问题 - 检查网页是否有条目,单击超链接并刷新
- visual-studio - Visual Studio -> 代码样式首选项:无严重性不存在
- javascript - Unicode Aware String.split('') 不使用 ES6 或 ES5
- java - 将结果 ResultInfo{who=null, request=65538, result=-1, data=null} 传递给活动失败
- java - 如何用阴影制作圆形边框
- mysql - 如何以正确的方式在 Mysql DB 中设置表键(索引)
- python-3.x - Simple_Smartsheet 有没有办法仅在打印一行时打印特定列?pprint(sheet.as_list())