优化了前端部署文件
parent
2f60764c33
commit
9c1c444397
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "tsc -b && vite build",
|
||||
"build:prod": "vite build",
|
||||
"lint": "eslint .",
|
||||
"preview": "vite preview"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue