ソースを参照

Feat: added Roboto font sources

AH-dark 2 年 前
コミット
b50ac26287
4 ファイル変更9 行追加1 行削除
  1. 1 0
      package.json
  2. 6 0
      pnpm-lock.yaml
  3. 1 0
      src/index.tsx
  4. 1 1
      vite.config.ts

+ 1 - 0
package.json

@@ -9,6 +9,7 @@
     "@emotion/cache": "^11.10.5",
     "@emotion/cache": "^11.10.5",
     "@emotion/react": "^11.10.5",
     "@emotion/react": "^11.10.5",
     "@emotion/styled": "^11.10.5",
     "@emotion/styled": "^11.10.5",
+    "@fontsource/roboto": "^4.5.8",
     "@mui/base": "^5.0.0-alpha.112",
     "@mui/base": "^5.0.0-alpha.112",
     "@mui/icons-material": "^5.11.0",
     "@mui/icons-material": "^5.11.0",
     "@mui/lab": "^5.0.0-alpha.114",
     "@mui/lab": "^5.0.0-alpha.114",

+ 6 - 0
pnpm-lock.yaml

@@ -11,6 +11,7 @@ specifiers:
   '@emotion/cache': ^11.10.5
   '@emotion/cache': ^11.10.5
   '@emotion/react': ^11.10.5
   '@emotion/react': ^11.10.5
   '@emotion/styled': ^11.10.5
   '@emotion/styled': ^11.10.5
+  '@fontsource/roboto': ^4.5.8
   '@mui/base': ^5.0.0-alpha.112
   '@mui/base': ^5.0.0-alpha.112
   '@mui/icons-material': ^5.11.0
   '@mui/icons-material': ^5.11.0
   '@mui/lab': ^5.0.0-alpha.114
   '@mui/lab': ^5.0.0-alpha.114
@@ -121,6 +122,7 @@ dependencies:
   '@emotion/cache': 11.10.5
   '@emotion/cache': 11.10.5
   '@emotion/react': 11.10.5_3grbeiqrb6djg67fiejiqngkdi
   '@emotion/react': 11.10.5_3grbeiqrb6djg67fiejiqngkdi
   '@emotion/styled': 11.10.5_pwtpayi7py7ecifctvjbac33ee
   '@emotion/styled': 11.10.5_pwtpayi7py7ecifctvjbac33ee
+  '@fontsource/roboto': 4.5.8
   '@mui/base': 5.0.0-alpha.112_ib3m5ricvtkl2cll7qpr2f6lvq
   '@mui/base': 5.0.0-alpha.112_ib3m5ricvtkl2cll7qpr2f6lvq
   '@mui/icons-material': 5.11.0_iq6n432hogcf75rdfmlkzd4zne
   '@mui/icons-material': 5.11.0_iq6n432hogcf75rdfmlkzd4zne
   '@mui/lab': 5.0.0-alpha.114_g2qhqczl4llrdlyw6kdsue26vu
   '@mui/lab': 5.0.0-alpha.114_g2qhqczl4llrdlyw6kdsue26vu
@@ -2160,6 +2162,10 @@ packages:
       - supports-color
       - supports-color
     dev: true
     dev: true
 
 
+  /@fontsource/roboto/4.5.8:
+    resolution: {integrity: sha512-CnD7zLItIzt86q4Sj3kZUiLcBk1dSk81qcqgMGaZe7SQ1P8hFNxhMl5AZthK1zrDM5m74VVhaOpuMGIL4gagaA==}
+    dev: false
+
   /@humanwhocodes/config-array/0.11.8:
   /@humanwhocodes/config-array/0.11.8:
     resolution: {integrity: sha512-UybHIJzJnR5Qc/MsD9Kr+RpO2h+/P1GhOwdiLPXK5TWk5sgTdu88bTD9UP+CKbPPh5Rni1u0GjAdYQLemG8g+g==}
     resolution: {integrity: sha512-UybHIJzJnR5Qc/MsD9Kr+RpO2h+/P1GhOwdiLPXK5TWk5sgTdu88bTD9UP+CKbPPh5Rni1u0GjAdYQLemG8g+g==}
     engines: {node: '>=10.10.0'}
     engines: {node: '>=10.10.0'}

+ 1 - 0
src/index.tsx

@@ -27,6 +27,7 @@ import { ConfigProvider } from "@/contexts/ConfigContext";
 import reportWebVitals from "@/reportWebVitals";
 import reportWebVitals from "@/reportWebVitals";
 
 
 import "@/global.scss";
 import "@/global.scss";
+import "@fontsource/roboto";
 
 
 // hash router change to browser router
 // hash router change to browser router
 if (window.location.hash) {
 if (window.location.hash) {

+ 1 - 1
vite.config.ts

@@ -42,7 +42,7 @@ export default defineConfig({
         entryFileNames: "static/js/[name].[hash:12].js",
         entryFileNames: "static/js/[name].[hash:12].js",
         assetFileNames: (info) => {
         assetFileNames: (info) => {
           if (["css", "sass", "scss"].some((ext) => info.name?.endsWith("." + ext))) {
           if (["css", "sass", "scss"].some((ext) => info.name?.endsWith("." + ext))) {
-            return "static/css/[name].[hash:12].css";
+            return "static/css/[name].[hash:12].[ext]";
           }
           }
 
 
           if (["png", "jpg", "jpeg", "gif", "svg"].some((ext) => info.name?.endsWith("." + ext))) {
           if (["png", "jpg", "jpeg", "gif", "svg"].some((ext) => info.name?.endsWith("." + ext))) {