refactor(web): replace local noto-sans-sc font with domestic CDN
This commit is contained in:
@@ -5,6 +5,8 @@
|
||||
<link rel="icon" type="image/svg+xml" href="./logo.svg" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title></title>
|
||||
<!-- 引入国内主流的 Google Fonts 加速 CDN (loli.net) 的 Noto Sans SC 字体 -->
|
||||
<link rel="stylesheet" href="https://fonts.loli.net/css2?family=Noto+Sans+SC:wght@100..900&display=swap" />
|
||||
</head>
|
||||
<!-- <h1>test-pack</h1> -->
|
||||
|
||||
|
||||
Generated
-10
@@ -10,7 +10,6 @@
|
||||
"dependencies": {
|
||||
"@fontsource-variable/inter": "^5.2.8",
|
||||
"@fontsource-variable/jetbrains-mono": "^5.2.8",
|
||||
"@fontsource-variable/noto-sans-sc": "^5.2.10",
|
||||
"@guolao/vue-monaco-editor": "^1.6.0",
|
||||
"@tailwindcss/vite": "^4.1.18",
|
||||
"@tanstack/vue-table": "^8.21.3",
|
||||
@@ -2087,15 +2086,6 @@
|
||||
"url": "https://github.com/sponsors/ayuhito"
|
||||
}
|
||||
},
|
||||
"node_modules/@fontsource-variable/noto-sans-sc": {
|
||||
"version": "5.2.10",
|
||||
"resolved": "https://registry.npmjs.org/@fontsource-variable/noto-sans-sc/-/noto-sans-sc-5.2.10.tgz",
|
||||
"integrity": "sha512-zdk10i5HrDQTXI7ldD61zToX1fsgig8vDTsu7zB48SXOitWfuX0e5viZAwnkHuhwh096PU6X6i1AyAsbBCISpA==",
|
||||
"license": "OFL-1.1",
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ayuhito"
|
||||
}
|
||||
},
|
||||
"node_modules/@guolao/vue-monaco-editor": {
|
||||
"version": "1.6.0",
|
||||
"resolved": "https://registry.npmjs.org/@guolao/vue-monaco-editor/-/vue-monaco-editor-1.6.0.tgz",
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
"dependencies": {
|
||||
"@fontsource-variable/inter": "^5.2.8",
|
||||
"@fontsource-variable/jetbrains-mono": "^5.2.8",
|
||||
"@fontsource-variable/noto-sans-sc": "^5.2.10",
|
||||
"@guolao/vue-monaco-editor": "^1.6.0",
|
||||
"@tailwindcss/vite": "^4.1.18",
|
||||
"@tanstack/vue-table": "^8.21.3",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
@import "tailwindcss";
|
||||
@import "tw-animate-css";
|
||||
@import "@fontsource-variable/inter/index.css";
|
||||
@import "@fontsource-variable/noto-sans-sc/index.css";
|
||||
|
||||
@import "@fontsource-variable/jetbrains-mono/index.css";
|
||||
|
||||
/* Sonner toast styles */
|
||||
|
||||
+1
-2
@@ -51,7 +51,7 @@ const releaseOptimizePlugin = (isOptimize: boolean) => ({
|
||||
if (isOptimize) {
|
||||
return html.replace(
|
||||
'</head>',
|
||||
` <link rel="preconnect" href="https://fonts.geekzu.org">\n <link rel="stylesheet" href="https://fonts.geekzu.org/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&family=Noto+Sans+SC:wght@100..900&display=swap">\n </head>`
|
||||
` <link rel="preconnect" href="https://fonts.geekzu.org">\n <link rel="stylesheet" href="https://fonts.geekzu.org/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&display=swap">\n </head>`
|
||||
)
|
||||
}
|
||||
return html
|
||||
@@ -61,7 +61,6 @@ const releaseOptimizePlugin = (isOptimize: boolean) => ({
|
||||
return {
|
||||
code: code
|
||||
.replace(/@import\s+["']@fontsource-variable\/inter\/index\.css["'];/g, '/* Removed for CDN */')
|
||||
.replace(/@import\s+["']@fontsource-variable\/noto-sans-sc\/index\.css["'];/g, '/* Removed for CDN */')
|
||||
.replace(/@import\s+["']@fontsource-variable\/jetbrains-mono\/index\.css["'];/g, '/* Removed for CDN */'),
|
||||
map: null
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user