Fix some for admin
This commit is contained in:
@@ -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
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user