From ea271b5975ee66cd4fd78b3d8b0d00c1195a7d11 Mon Sep 17 00:00:00 2001 From: mmabdalla <101379618+mmabdalla@users.noreply.github.com> Date: Mon, 29 Dec 2025 09:41:16 +0200 Subject: [PATCH] Fix: Configure Vite base path to /bp_wb/ for BOSA namespace routing --- server.js | 3 ++- vite.config.js | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/server.js b/server.js index ad7d367..e728166 100644 --- a/server.js +++ b/server.js @@ -79,7 +79,8 @@ app.use('/api/pages', createPagesRouter()); app.get('/preview/:id', previewPage); // Serve static assets (Vite build outputs) -// Note: BOSA forwards /bp_wb/assets/* to this plugin, so Express receives /assets/* +// BOSA forwards /bp_wb/assets/* to this plugin, Express receives /assets/* +// The base path in Vite config ensures assets are referenced as /bp_wb/assets/* app.use('/assets', express.static(path.join(__dirname, 'dist', 'assets'))); async function serveEditor(req, res) { diff --git a/vite.config.js b/vite.config.js index b86f328..e194efe 100644 --- a/vite.config.js +++ b/vite.config.js @@ -7,6 +7,7 @@ const __filename = fileURLToPath(import.meta.url); const __dirname = path.dirname(__filename); export default defineConfig({ + base: '/bp_wb/', plugins: [react()], resolve: { alias: {