diff --git a/.changeset/good-avocados-grow.md b/.changeset/good-avocados-grow.md new file mode 100644 index 0000000000..daf161b399 --- /dev/null +++ b/.changeset/good-avocados-grow.md @@ -0,0 +1,5 @@ +--- +'@backstage/core-app-api': minor +--- + +Updated the routing system to be compatible with `react-router` v6 stable. diff --git a/packages/core-app-api/src/routing/collectors.test.tsx b/packages/core-app-api/src/routing/collectors.test.tsx index 1c5bc8c639..bb67966fbd 100644 --- a/packages/core-app-api/src/routing/collectors.test.tsx +++ b/packages/core-app-api/src/routing/collectors.test.tsx @@ -109,7 +109,7 @@ function routeObj( routeRefs: new Set(refs), children: [ { - path: '/*', + path: '*', caseSensitive: false, element: 'match-all', routeRefs: new Set(), diff --git a/packages/core-app-api/src/routing/collectors.tsx b/packages/core-app-api/src/routing/collectors.tsx index fcd954201a..13220d769a 100644 --- a/packages/core-app-api/src/routing/collectors.tsx +++ b/packages/core-app-api/src/routing/collectors.tsx @@ -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(), };