Skip to content

Commit fe445e3

Browse files
committed
Add Fontsource Roboto node module
1 parent f5071ee commit fe445e3

File tree

5 files changed

+23
-1
lines changed

5 files changed

+23
-1
lines changed

package-lock.json

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
"@date-io/moment": "^1.3.11",
2828
"@emotion/react": "^11.8.2",
2929
"@emotion/styled": "^11.8.1",
30+
"@fontsource/roboto": "^4.5.8",
3031
"@mui/icons-material": "^5.5.1",
3132
"@mui/lab": "^5.0.0-alpha.73",
3233
"@mui/material": "^5.5.1",

src/client/index.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
<meta name="viewport" content="width=device-width, initial-scale=1">
1010
<meta name="description" content="" />
1111
<meta name="robots" content="noindex">
12-
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap" />
1312
<title></title>
1413
</head>
1514

src/client/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ import '@nosferatu500/react-sortable-tree/style.css'
1515
import 'react-redux-toastr/lib/css/react-redux-toastr.min.css'
1616
import 'mapbox-gl/dist/mapbox-gl.css'
1717
import portalConfig from '../configs/portalConfig.json'
18+
import '@fontsource/roboto/300.css'
19+
import '@fontsource/roboto/400.css'
20+
import '@fontsource/roboto/500.css'
21+
import '@fontsource/roboto/700.css'
1822

1923
const { localeConfig, layoutConfig } = portalConfig
2024
const store = configureStore()

webpack.client.common.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,13 @@ module.exports = {
6262
options: {
6363
outputPath: 'images'
6464
}
65+
},
66+
{
67+
test: /\.(woff2|woff|eot|ttf)$/,
68+
loader: 'file-loader',
69+
options: {
70+
name: 'fonts/[name].[ext]'
71+
}
6572
}
6673
]
6774
},

0 commit comments

Comments
 (0)