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
2025-07-05 23:45:23 +08:00
parent 96ac0f1a2d
commit 999465cc50
2 changed files with 14 additions and 12 deletions
+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
+3 -1
View File
@@ -51,7 +51,9 @@ export default defineConfig({
}, },
plugins: [ plugins: [
react(), react(),
checker({ process.env.DISABLE_VITE_CHECKER
? undefined
: checker({
typescript: true, typescript: true,
eslint: eslint:
envVars.VITE_APP_ENABLE_ESLINT === "false" envVars.VITE_APP_ENABLE_ESLINT === "false"