Przeglądaj źródła

chore: update CI workflow to use latest Bun version and adjust build environment variables

CaIon 8 miesięcy temu
rodzic
commit
7bced6b236

+ 2 - 2
.github/workflows/linux-release.yml

@@ -22,14 +22,14 @@ jobs:
           fetch-depth: 0
       - uses: oven-sh/setup-bun@v2
         with:
-          bun-version: 1.2.8
+          bun-version: latest
       - name: Build Frontend
         env:
           CI: ""
         run: |
           cd web
           bun install
-          REACT_APP_VERSION=$(git describe --tags) bun run build
+          DISABLE_ESLINT_PLUGIN='true' VITE_REACT_APP_VERSION=$(git describe --tags) bun run build
           cd ..
       - name: Set up Go
         uses: actions/setup-go@v3

BIN
web/bun.lockb


+ 1 - 5
web/package.json

@@ -43,10 +43,6 @@
     "unist-util-visit": "^5.0.0",
     "use-debounce": "^10.0.4"
   },
-  "trustedDependencies": [
-    "esbuild",
-    "@parcel/watcher"
-  ],
   "scripts": {
     "dev": "vite",
     "build": "vite build",
@@ -73,7 +69,7 @@
     ]
   },
   "devDependencies": {
-    "@douyinfe/semi-webpack-plugin": "^2.78.0",
+    "@douyinfe/vite-plugin-semi": "^2.74.0-alpha.6",
     "@so1ve/prettier-config": "^3.1.0",
     "@vitejs/plugin-react": "^4.2.1",
     "autoprefixer": "^10.4.21",

+ 1 - 1
web/src/hooks/useApiRequest.js

@@ -1,6 +1,6 @@
 import { useCallback } from 'react';
 import { useTranslation } from 'react-i18next';
-import { SSE } from 'sse';
+import { SSE } from 'sse.js';
 import {
   API_ENDPOINTS,
   MESSAGE_STATUS,

+ 4 - 11
web/vite.config.js

@@ -1,6 +1,6 @@
 import react from '@vitejs/plugin-react';
 import { defineConfig, transformWithEsbuild } from 'vite';
-import semiWebpackPlugin from '@douyinfe/semi-webpack-plugin';
+import { vitePluginSemi } from '@douyinfe/vite-plugin-semi';
 
 // https://vitejs.dev/config/
 export default defineConfig({
@@ -21,16 +21,9 @@ export default defineConfig({
       },
     },
     react(),
-    {
-      name: 'semi-plugin',
-      apply: 'build',
-      configResolved() {
-        // Apply SemiWebpackPlugin during build
-        new semiWebpackPlugin({
-          cssLayer: true
-        });
-      }
-    }
+    vitePluginSemi({
+      cssLayer: true
+    })
   ],
   optimizeDeps: {
     force: true,