core-compat-api: forward routes to converted plugins
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/core-compat-api': patch
|
||||
---
|
||||
|
||||
Plugins converted by `convertLegacyApp` now have their `routes` and `externalRoutes` included as well, allowing the to be used to bind external routes in configuration.
|
||||
@@ -32,7 +32,10 @@ import {
|
||||
} from '@backstage/frontend-plugin-api';
|
||||
import React, { Children, ReactNode, isValidElement } from 'react';
|
||||
import { Route, Routes } from 'react-router-dom';
|
||||
import { convertLegacyRouteRef } from './convertLegacyRouteRef';
|
||||
import {
|
||||
convertLegacyRouteRef,
|
||||
convertLegacyRouteRefs,
|
||||
} from './convertLegacyRouteRef';
|
||||
import { compatWrapper } from './compatWrapper';
|
||||
|
||||
/*
|
||||
@@ -244,6 +247,8 @@ export function collectLegacyRoutes(
|
||||
createApiExtension({ factory }),
|
||||
),
|
||||
],
|
||||
routes: convertLegacyRouteRefs(plugin.routes ?? {}),
|
||||
externalRoutes: convertLegacyRouteRefs(plugin.externalRoutes ?? {}),
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user