优化了前端部署文件
parent
2f60764c33
commit
9c1c444397
|
|
@ -21,8 +21,8 @@ COPY . .
|
||||||
ARG VITE_API_BASE_URL=http://localhost/api
|
ARG VITE_API_BASE_URL=http://localhost/api
|
||||||
ENV VITE_API_BASE_URL=$VITE_API_BASE_URL
|
ENV VITE_API_BASE_URL=$VITE_API_BASE_URL
|
||||||
|
|
||||||
# Build the application
|
# Build the application (skip TypeScript check for faster builds)
|
||||||
RUN npm run build
|
RUN npm run build:prod
|
||||||
|
|
||||||
# Stage 2: Production with Nginx
|
# Stage 2: Production with Nginx
|
||||||
FROM swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/nginx:1.25-alpine
|
FROM swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/nginx:1.25-alpine
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
"build": "tsc -b && vite build",
|
"build": "tsc -b && vite build",
|
||||||
|
"build:prod": "vite build",
|
||||||
"lint": "eslint .",
|
"lint": "eslint .",
|
||||||
"preview": "vite preview"
|
"preview": "vite preview"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ interface Toast {
|
||||||
onClose?: () => void;
|
onClose?: () => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface ToastContextValue {
|
export interface ToastContextValue {
|
||||||
showToast: (message: ReactNode, type?: ToastType, duration?: number, onClose?: () => void) => string;
|
showToast: (message: ReactNode, type?: ToastType, duration?: number, onClose?: () => void) => string;
|
||||||
success: (message: ReactNode, duration?: number, onClose?: () => void) => string;
|
success: (message: ReactNode, duration?: number, onClose?: () => void) => string;
|
||||||
error: (message: ReactNode, duration?: number, onClose?: () => void) => string;
|
error: (message: ReactNode, duration?: number, onClose?: () => void) => string;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue