core-app-api: route collection react-router stable compatibility

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2022-03-25 16:44:08 +01:00
parent 70299c99d5
commit a448fea691
3 changed files with 7 additions and 2 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/core-app-api': minor
---
Updated the routing system to be compatible with `react-router` v6 stable.
@@ -109,7 +109,7 @@ function routeObj(
routeRefs: new Set(refs),
children: [
{
path: '/*',
path: '*',
caseSensitive: false,
element: 'match-all',
routeRefs: new Set(),
@@ -30,7 +30,7 @@ import { FeatureFlagged, FeatureFlaggedProps } from './FeatureFlagged';
// mount points that are as deep in the routing tree as possible.
export const MATCH_ALL_ROUTE: BackstageRouteObject = {
caseSensitive: false,
path: '/*',
path: '*',
element: 'match-all', // These elements aren't used, so we add in a bit of debug information
routeRefs: new Set(),
};