admin-panel: build into the folder the Docker image actually serves

The Dockerfile does `COPY dist /usr/share/nginx/html` and nginx serves that
folder's root, but vite's outDir was 'dist/export' (carried over from legacy's
vue.config.js). So the deployed root kept serving whatever index.html had been
committed at dist/ — a stale pre-port prototype build (lang="en", title
"Gold Bank — Admin Panel", no ant-design-vue at all, committed 2026-09-10 in
cea3b80). That artifact, not the current source, renders as an unstyled stack
of bullets and bare tables.

outDir is now 'dist' (and 'branchDist'), matching what the image serves and
matching apps/user-app's convention.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
s.esmaeili
2026-09-14 17:30:04 +03:30
co-authored by Claude Opus 5
parent acc41c21d9
commit 9b6b54dc71
4 changed files with 16 additions and 38 deletions
File diff suppressed because one or more lines are too long
-1
View File
@@ -1 +0,0 @@
header[data-v-83ac81a0]{padding:1rem;border-bottom:1px solid #ddd}main[data-v-83ac81a0]{padding:1rem}table[data-v-b7e9a99c]{width:100%;border-collapse:collapse}th[data-v-b7e9a99c],td[data-v-b7e9a99c]{text-align:left;padding:.5rem;border-bottom:1px solid #ddd}.error[data-v-b7e9a99c]{color:#b00020}table[data-v-15a1e392]{width:100%;border-collapse:collapse;margin-bottom:1rem}th[data-v-15a1e392],td[data-v-15a1e392]{text-align:left;padding:.4rem}.error[data-v-15a1e392],.error[data-v-f898fdad]{color:#b00020}
+8 -5
View File
@@ -1,13 +1,16 @@
<!doctype html>
<html lang="en">
<html lang="fa" dir="rtl">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Gold Bank — Admin Panel</title>
<script type="module" crossorigin src="/assets/index-B84ZE15H.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-CsChEyRN.css">
<title>هنزاگلد — پنل مدیریت</title>
<script type="module" crossorigin src="/admin/assets/index-C4VtVyHl.js"></script>
<link rel="stylesheet" crossorigin href="/admin/assets/index-CYR6yEty.css">
</head>
<body>
<div id="app"></div>␍
<div id="app">
<!-- Removed by router.afterEach, ported from legacy henza_admin/src/router.js:147-153 -->
<div id="loading-bg"></div>
</div>␍
</body>
</html>
+8 -2
View File
@@ -30,8 +30,14 @@ export default defineConfig(({ mode }) => {
},
},
build: {
// legacy: outputDir: isBranch ? 'branchDist/export' : 'dist/export'
outDir: isBranch ? 'branchDist/export' : 'dist/export',
// Legacy's vue.config.js used outputDir 'dist/export' / 'branchDist/export',
// but this app's Dockerfile does `COPY dist /usr/share/nginx/html` and nginx
// serves that folder's ROOT. With the build landing in dist/export/, the
// root kept whatever index.html was committed there before — a stale
// pre-port build — so the deployed panel served that instead of this app.
// Build straight into the folder the image actually serves (which is also
// what apps/user-app does).
outDir: isBranch ? 'branchDist' : 'dist',
emptyOutDir: true,
sourcemap: false, // legacy: productionSourceMap: false
},