Drafting admin app (frontend)

This commit is contained in:
2025-08-13 03:24:27 +00:00
parent ee3708105b
commit ff9bb1558d
5 changed files with 114 additions and 1 deletions
+12 -1
View File
@@ -1,6 +1,7 @@
import { fileURLToPath, URL } from 'node:url'
import { defineConfig } from 'vite'
import { resolve } from 'node:path'
import vue from '@vitejs/plugin-vue'
// https://vite.dev/config/
@@ -13,6 +14,7 @@ export default defineConfig(({ command, mode }) => ({
'@': fileURLToPath(new URL('./src', import.meta.url))
},
},
// Use absolute paths at dev, deploy under /auth/
base: command === 'build' ? '/auth/' : '/',
server: {
port: 4403,
@@ -27,6 +29,15 @@ export default defineConfig(({ command, mode }) => ({
build: {
outDir: '../passkey/frontend-build',
emptyOutDir: true,
assetsDir: 'assets'
assetsDir: 'assets',
rollupOptions: {
input: {
index: resolve(__dirname, 'index.html'),
admin: resolve(__dirname, 'admin/index.html')
},
output: {
// Ensure HTML files land as /auth/index.html and /auth/admin.html -> we will serve /auth/admin mapping in backend
}
}
}
}))