From fea1e7db708ca5417fd67014f0827bb583c46701 Mon Sep 17 00:00:00 2001 From: Christoph Jerolimov Date: Fri, 14 Mar 2025 12:05:06 +0100 Subject: [PATCH] fix(marketplace): add MUI v5 workaround to marketplace wrapper, similar to other plugins Signed-off-by: Christoph Jerolimov --- .../package.json | 1 + .../src/index.ts | 8 ++++++++ yarn.lock | 1 + 3 files changed, 10 insertions(+) diff --git a/dynamic-plugins/wrappers/red-hat-developer-hub-backstage-plugin-marketplace/package.json b/dynamic-plugins/wrappers/red-hat-developer-hub-backstage-plugin-marketplace/package.json index e9bc8b4deb..3f0569c94a 100644 --- a/dynamic-plugins/wrappers/red-hat-developer-hub-backstage-plugin-marketplace/package.json +++ b/dynamic-plugins/wrappers/red-hat-developer-hub-backstage-plugin-marketplace/package.json @@ -29,6 +29,7 @@ "export-dynamic:clean": "run export-dynamic --clean" }, "dependencies": { + "@mui/material": "5.16.14", "@red-hat-developer-hub/backstage-plugin-marketplace": "0.2.1" }, "devDependencies": { diff --git a/dynamic-plugins/wrappers/red-hat-developer-hub-backstage-plugin-marketplace/src/index.ts b/dynamic-plugins/wrappers/red-hat-developer-hub-backstage-plugin-marketplace/src/index.ts index 2c44ad9c08..5957a35302 100644 --- a/dynamic-plugins/wrappers/red-hat-developer-hub-backstage-plugin-marketplace/src/index.ts +++ b/dynamic-plugins/wrappers/red-hat-developer-hub-backstage-plugin-marketplace/src/index.ts @@ -1 +1,9 @@ +import { unstable_ClassNameGenerator as ClassNameGenerator } from '@mui/material/className'; + +ClassNameGenerator.configure(componentName => { + return componentName.startsWith('v5-') + ? componentName + : `v5-${componentName}`; +}) + export * from "@red-hat-developer-hub/backstage-plugin-marketplace"; diff --git a/yarn.lock b/yarn.lock index 868de051af..23e84c76b9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -41059,6 +41059,7 @@ __metadata: dependencies: "@backstage/cli": 0.29.6 "@janus-idp/cli": 3.2.0 + "@mui/material": 5.16.14 "@red-hat-developer-hub/backstage-plugin-marketplace": 0.2.1 typescript: 5.7.3 languageName: unknown