committed by
Patrik Oldsberg
parent
879b1aa6f5
commit
12c3fadb6d
@@ -14,9 +14,16 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
type Modules = Array<{
|
||||
name: string;
|
||||
module: object; // Loaded Webpack Module of Backstage Plugin
|
||||
}>;
|
||||
|
||||
function getAvailablePlugins() {
|
||||
return __webpack_require__(
|
||||
const { modules }: { modules: Modules } = __webpack_require__(
|
||||
'./node_modules/backstage-autodetected-plugins.js',
|
||||
);
|
||||
return modules;
|
||||
}
|
||||
|
||||
export { getAvailablePlugins };
|
||||
|
||||
@@ -79,7 +79,7 @@ export const InfoContent = () => {
|
||||
const { about, loading, error } = useInfo();
|
||||
const plugins = autodetect.getAvailablePlugins();
|
||||
const availablePlugins: PackageDependency[] = (
|
||||
plugins.modules as Array<Record<string, any>>
|
||||
plugins as Array<Record<string, any>>
|
||||
).map(({ name, module }) => {
|
||||
const pluginImpl: any = Object.values(module).find((v: any) => !!v?.getId);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user