The complete open source platform to run your entire marketplace. Storefront, vendor panel, admin console, and integrations in one enterprise-grade platform you own.
TypeScript b2b-marketplacecomposable-commerceecommerceenterpriseheadless-commercemarketplacemedusamedusajsmulti-vendortypescript
fix(core-plugin, dashboard-sdk): strip base path in dashboard proxy and replace js-sdk with client (#837)
Jakub Sieradzki695312cc8ad7
diff --git a/packages/core-plugin/src/utils/dashboard/dashboard-base.ts b/packages/core-plugin/src/utils/dashboard/dashboard-base.tsindex 74475ad4e..7db8af225 100644--- a/packages/core-plugin/src/utils/dashboard/dashboard-base.ts+++ b/packages/core-plugin/src/utils/dashboard/dashboard-base.ts@@ -96,6 +96,7 @@ export abstract class DashboardBase {const proxyMiddleware = createProxyMiddleware({target: this.getViteDevServerUrl(),+ pathRewrite: { [`^${route}`]: "" },})const staticServer = express.Router()@@ -123,6 +124,7 @@ export abstract class DashboardBase {}case "static": {+ req.url = req.url.slice(route.length) || "/"staticServer(req, res, next)return}diff --git a/packages/dashboard-sdk/src/plugin.ts b/packages/dashboard-sdk/src/plugin.tsindex aa2e945bb..b1715cae2 100644--- a/packages/dashboard-sdk/src/plugin.ts+++ b/packages/dashboard-sdk/src/plugin.ts@@ -176,7 +176,7 @@ export function mercurDashboardPlugin(pluginConfig: MercurConfig): Vite.Plugin {"react-i18next","@medusajs/ui","@medusajs/dashboard",- "@medusajs/js-sdk",+ "@mercurjs/client","@tanstack/react-query",],},