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:
co-authored by
Claude Opus 5
parent
acc41c21d9
commit
9b6b54dc71
@@ -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
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user