Selaa lähdekoodia

feat: 优化-2024/12/17 00:02:49

shuisheng 1 vuosi sitten
vanhempi
sitoutus
e49d9ce6a3
2 muutettua tiedostoa jossa 7 lisäystä ja 13 poistoa
  1. 4 0
      .npmrc
  2. 3 13
      vite.config.ts

+ 4 - 0
.npmrc

@@ -4,3 +4,7 @@ shamefully-hoist=true
 registry=https://registry.npmmirror.com/
 # 设置@billd*包使用的镜像
 @billd:registry=https://registry.hsslive.cn/
+# https://sharp.pixelplumbing.com/install#chinese-mirror
+sharp_libvips_binary_host=https://registry.npmmirror.com/mirrors/sharp-libvips
+sharp_binary_host=https://registry.npmmirror.com/mirrors/sharp
+canvas_binary_host_mirror=https://registry.npmmirror.com/-/binary/canvas

+ 3 - 13
vite.config.ts

@@ -12,25 +12,15 @@ import { createHtmlPlugin } from 'vite-plugin-html';
 
 import pkg from './package.json';
 
-const isWeb = process.env['VITE_APP_RELEASE_PROJECT_ISWEB'] === 'true';
-
 // https://vitejs.dev/config/
 export default defineConfig(({ mode }) => {
   const isProduction = mode === 'production';
 
   const outputStaticUrl = () => {
-    if (isWeb) {
-      if (isProduction) {
-        return 'https://resource.hsslive.cn/billd-live/client/dist/';
-      } else {
-        return './';
-      }
+    if (isProduction) {
+      return 'https://resource.hsslive.cn/billd-live/client/dist/';
     } else {
-      if (isProduction) {
-        return 'dist';
-      } else {
-        return './';
-      }
+      return './';
     }
   };