docs: update plugin installation docs
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -31,26 +31,17 @@ When you have an instance running that Backstage can hook into, first install th
|
||||
$ yarn add @backstage/plugin-lighthouse
|
||||
```
|
||||
|
||||
Then make sure to export the plugin in
|
||||
your app's [`plugins.ts`](https://github.com/backstage/backstage/blob/master/packages/app/src/plugins.ts)
|
||||
to enable the plugin:
|
||||
|
||||
```js
|
||||
export { plugin as LighthousePlugin } from '@backstage/plugin-lighthouse';
|
||||
```
|
||||
|
||||
Modify your app routes in `App.tsx` to include the Router component exported from the plugin, for example:
|
||||
Modify your app routes in `App.tsx` to include the `LighthousePage` component exported from the plugin, for example:
|
||||
|
||||
```tsx
|
||||
// At the top imports
|
||||
import { Router as LighthouseRouter } from '@backstage/plugin-lighthouse';
|
||||
import { LighthousePage } from '@backstage/plugin-lighthouse';
|
||||
|
||||
// Inside App component
|
||||
<Routes>
|
||||
<FlatRoutes>
|
||||
// ...
|
||||
<Route path="/lighthouse/*" element={<LighthouseRouter />} />
|
||||
<Route path="/lighthouse" element={<LighthousePage />} />
|
||||
// ...
|
||||
</Routes>;
|
||||
</FlatRoutes>;
|
||||
```
|
||||
|
||||
Then configure the `lighthouse-audit-service` URL in your [`app-config.yaml`](https://github.com/backstage/backstage/blob/master/app-config.yaml).
|
||||
|
||||
Reference in New Issue
Block a user