Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions react/cra-template/template/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap" />
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am honestly a little torn on this. This is super simple but does have the potential disadvantage that we are dependent on the external cdn for the app to look right (google should be up but what if it isn't).

Thoughts on using something like this https://github.com/fontsource/fontsource to include these fonts in the bundle?

//fonts.ts

import "fontsource-roboto";
import "fontsource-material-icons";

theme.ts

import "./fonts";

// do material theme things

<script src="%PUBLIC_URL%/env.js?v=%REACT_APP_VERSION%"></script>
<title>React App</title>
<meta name="description" content="Web site created using create-react-app" />
Expand Down