dashboard-v2 fix: absolute /clawstor/ base #96
@@ -6,12 +6,13 @@ import react from '@vitejs/plugin-react';
|
|||||||
// During local dev the daemon proxies /api/v2/* on :7700 so
|
// During local dev the daemon proxies /api/v2/* on :7700 so
|
||||||
// `vite dev` on :5173 can hit it via server.proxy.
|
// `vite dev` on :5173 can hit it via server.proxy.
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
// Relative asset URLs so the SPA works under any mount path.
|
// Absolute base tied to the deploy path. Prior try was `./`
|
||||||
// Local: served at :7700/v2/ → assets requested as ./assets/...
|
// (fully relative) which broke when the user hit `/clawstor`
|
||||||
// Tailscale: /clawstor → assets requested as ./assets/...
|
// without trailing slash — browser resolves `./assets/…`
|
||||||
// Vite emits `./assets/index-XXX.js` in index.html which the
|
// against `/clawstor` treated as a file, gives `/assets/…`,
|
||||||
// browser resolves relative to the current URL — works for both.
|
// 404 from Tailscale. Absolute `/clawstor/` sidesteps the
|
||||||
base: './',
|
// slash / no-slash ambiguity.
|
||||||
|
base: '/clawstor/',
|
||||||
plugins: [react()],
|
plugins: [react()],
|
||||||
server: {
|
server: {
|
||||||
port: 5173,
|
port: 5173,
|
||||||
|
|||||||
Reference in New Issue
Block a user