فهرست منبع

vite config base url insert /app

xf 1 سال پیش
والد
کامیت
9e7f5219c8
2فایلهای تغییر یافته به همراه3 افزوده شده و 1 حذف شده
  1. 2 0
      Dockerfile
  2. 1 1
      vite.config.ts

+ 2 - 0
Dockerfile

@@ -4,4 +4,6 @@ COPY nginx.conf /etc/nginx/nginx.conf
 
 COPY ./ /usr/share/nginx/html
 
+COPY ./ /app
+
 CMD ["sh", "-c", "sed -i \"s@<html@<html data-env=\"$API_ENV\"@\" /usr/share/nginx/html/index.html; nginx -g \"daemon off;\""]

+ 1 - 1
vite.config.ts

@@ -17,7 +17,7 @@ export default defineConfig((mode: ConfigEnv) => {
 		],
 		root: process.cwd(),
 		resolve: { alias: { '@': resolve(__dirname, './src') } },
-		base: mode.command === 'serve' ? './' : './app',
+		base: mode.command === 'serve' ? './' : '/app',
 		hmr: true,
 		server: {
 			host: '0.0.0.0',