create-app: update to bind the org plugin catalog index route

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2022-01-19 18:38:43 +01:00
parent 319ca2b20a
commit 5e8d278f8e
2 changed files with 31 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
---
'@backstage/create-app': patch
---
Added an external route binding from the `org` plugin to the catalog index page.
This change is needed because `@backstage/plugin-org` now has a required external route that needs to be bound for the app to start.
To apply this change to an existing app, make the following change to `packages/app/src/App.tsx`:
```diff
import { ScaffolderPage, scaffolderPlugin } from '@backstage/plugin-scaffolder';
+import { orgPlugin } from '@backstage/plugin-org';
import { SearchPage } from '@backstage/plugin-search';
```
And further down within the `createApp` call:
```diff
bind(scaffolderPlugin.externalRoutes, {
registerComponent: catalogImportPlugin.routes.importPage,
});
+ bind(orgPlugin.externalRoutes, {
+ catalogIndex: catalogPlugin.routes.catalogIndex,
+ });
},
```
@@ -11,6 +11,7 @@ import {
catalogImportPlugin,
} from '@backstage/plugin-catalog-import';
import { ScaffolderPage, scaffolderPlugin } from '@backstage/plugin-scaffolder';
import { orgPlugin } from '@backstage/plugin-org';
import { SearchPage } from '@backstage/plugin-search';
import { TechRadarPage } from '@backstage/plugin-tech-radar';
import {
@@ -42,6 +43,9 @@ const app = createApp({
bind(scaffolderPlugin.externalRoutes, {
registerComponent: catalogImportPlugin.routes.importPage,
});
bind(orgPlugin.externalRoutes, {
catalogIndex: catalogPlugin.routes.catalogIndex,
});
},
});