优化了前端部署文件

main
mula.liu 2025-12-02 22:34:30 +08:00
parent 2f60764c33
commit 9c1c444397
3 changed files with 4 additions and 3 deletions

View File

@ -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

View File

@ -6,6 +6,7 @@
"scripts": {
"dev": "vite",
"build": "tsc -b && vite build",
"build:prod": "vite build",
"lint": "eslint .",
"preview": "vite preview"
},

View File

@ -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;