Add option to disable vite checker via env variable

Introduced the DISABLE_VITE_CHECKER environment variable to conditionally disable the vite checker plugin in the build process. Updated the Dockerfile to set this variable during the Docker build, allowing builds to bypass vite checker when needed.
This commit is contained in:
Yuzhong Zhang committed 2025-07-05 23:45:23 +08:00
1 parent 96ac0f1a2d
commit 999465cc50
2 files changed
+14 -12

No files matched your search

+1 -1
View File
@@ -4,7 +4,7 @@ WORKDIR /app
# 复制 excalidraw 子模块 # 复制 excalidraw 子模块
COPY excalidraw/ ./excalidraw/ COPY excalidraw/ ./excalidraw/
# 构建前端 # 构建前端
RUN cd excalidraw && npm install -g pnpm && pnpm install && cd excalidraw-app && pnpm build:app:docker RUN cd excalidraw && npm install -g pnpm && pnpm install && cd excalidraw-app && DISABLE_VITE_CHECKER=true pnpm build:app:docker
# 后端构建阶段 # 后端构建阶段
FROM golang:alpine AS backend-builder FROM golang:alpine AS backend-builder
+13 -11
View File
@@ -51,17 +51,19 @@ export default defineConfig({
}, },
plugins: [ plugins: [
react(), react(),
checker({ process.env.DISABLE_VITE_CHECKER
typescript: true, ? undefined
eslint: : checker({
envVars.VITE_APP_ENABLE_ESLINT === "false" typescript: true,
? undefined eslint:
: { lintCommand: 'eslint "./**/*.{js,ts,tsx}"' }, envVars.VITE_APP_ENABLE_ESLINT === "false"
overlay: { ? undefined
initialIsOpen: envVars.VITE_APP_COLLAPSE_OVERLAY === "false", : { lintCommand: 'eslint "./**/*.{js,ts,tsx}"' },
badgeStyle: "margin-bottom: 4rem; margin-left: 1rem", overlay: {
}, initialIsOpen: envVars.VITE_APP_COLLAPSE_OVERLAY === "false",
}), badgeStyle: "margin-bottom: 4rem; margin-left: 1rem",
},
}),
svgrPlugin(), svgrPlugin(),
ViteEjsPlugin(), ViteEjsPlugin(),
VitePWA({ VitePWA({