Fix some for admin

This commit is contained in:
Montech
2026-09-15 17:06:27 +03:30
parent a7e13fe64e
commit 938b1c0b76
142 changed files with 391 additions and 42 deletions
+7 -4
View File
@@ -8,10 +8,12 @@ import vue from '@vitejs/plugin-vue';
// which src/utils/index.ts reads via import.meta.env.MODE.
export default defineConfig(({ mode }) => {
const isBranch = mode === 'branch';
// Dev keeps the legacy /admin/ prefix (localhost:5174/admin/auth/login).
// Production is served on a dedicated Dokploy domain, so the app lives at /.
const base = isBranch ? '/branch/' : mode === 'development' ? '/admin/' : '/';
return {
// legacy: publicPath: isBranch ? '/branch/' : 'admin/'
base: isBranch ? '/branch/' : '/admin/',
base,
plugins: [vue()],
resolve: {
alias: {
@@ -34,8 +36,9 @@ export default defineConfig(({ mode }) => {
},
},
build: {
// legacy: outputDir: isBranch ? 'branchDist/export' : 'dist/export'
outDir: isBranch ? 'branchDist/export' : 'dist/export',
// legacy used dist/export for a shared-host path deploy. Dokploy copies
// this folder onto nginx's html root, so production must emit at dist/.
outDir: isBranch ? 'branchDist/export' : 'dist',
emptyOutDir: true,
sourcemap: false, // legacy: productionSourceMap: false
},