From 9c1c444397e2182fcfabe99a592d0f0705a1a7a2 Mon Sep 17 00:00:00 2001 From: "mula.liu" Date: Tue, 2 Dec 2025 22:34:30 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BA=86=E5=89=8D=E7=AB=AF?= =?UTF-8?q?=E9=83=A8=E7=BD=B2=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/Dockerfile | 4 ++-- frontend/package.json | 1 + frontend/src/contexts/ToastContext.tsx | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/frontend/Dockerfile b/frontend/Dockerfile index 7055c2d..f9df441 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -21,8 +21,8 @@ COPY . . ARG VITE_API_BASE_URL=http://localhost/api ENV VITE_API_BASE_URL=$VITE_API_BASE_URL -# Build the application -RUN npm run build +# Build the application (skip TypeScript check for faster builds) +RUN npm run build:prod # Stage 2: Production with Nginx FROM swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/nginx:1.25-alpine diff --git a/frontend/package.json b/frontend/package.json index 18c2853..03f7026 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -6,6 +6,7 @@ "scripts": { "dev": "vite", "build": "tsc -b && vite build", + "build:prod": "vite build", "lint": "eslint .", "preview": "vite preview" }, diff --git a/frontend/src/contexts/ToastContext.tsx b/frontend/src/contexts/ToastContext.tsx index 47a85ae..af6f613 100644 --- a/frontend/src/contexts/ToastContext.tsx +++ b/frontend/src/contexts/ToastContext.tsx @@ -13,7 +13,7 @@ interface Toast { onClose?: () => void; } -interface ToastContextValue { +export interface ToastContextValue { showToast: (message: ReactNode, type?: ToastType, duration?: number, onClose?: () => void) => string; success: (message: ReactNode, duration?: number, onClose?: () => void) => string; error: (message: ReactNode, duration?: number, onClose?: () => void) => string;