diff --git a/.changeset/smart-bags-sell.md b/.changeset/smart-bags-sell.md new file mode 100644 index 0000000000..2c5f5c4d87 --- /dev/null +++ b/.changeset/smart-bags-sell.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-app-visualizer': patch +--- + +New `devDependency` for local development setup. diff --git a/plugins/app-visualizer/dev/index.ts b/plugins/app-visualizer/dev/index.ts new file mode 100644 index 0000000000..fa49e3360b --- /dev/null +++ b/plugins/app-visualizer/dev/index.ts @@ -0,0 +1,25 @@ +/* + * Copyright 2024 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import ReactDOM from 'react-dom/client'; +import { createApp } from '@backstage/frontend-defaults'; +import { default as plugin } from '../src'; + +const app = createApp({ + features: [plugin], +}); + +ReactDOM.createRoot(document.getElementById('root')!).render(app.createRoot()); diff --git a/plugins/app-visualizer/package.json b/plugins/app-visualizer/package.json index 4f7afbd632..5adbc95e7c 100644 --- a/plugins/app-visualizer/package.json +++ b/plugins/app-visualizer/package.json @@ -42,6 +42,7 @@ }, "devDependencies": { "@backstage/cli": "workspace:^", + "@backstage/frontend-defaults": "workspace:^", "@types/react": "^18.0.0", "react": "^18.0.2", "react-dom": "^18.0.2", diff --git a/yarn.lock b/yarn.lock index b8ec24afbe..c16ff81ca1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5017,6 +5017,7 @@ __metadata: "@backstage/cli": "workspace:^" "@backstage/core-components": "workspace:^" "@backstage/core-plugin-api": "workspace:^" + "@backstage/frontend-defaults": "workspace:^" "@backstage/frontend-plugin-api": "workspace:^" "@material-ui/core": ^4.12.2 "@material-ui/icons": ^4.9.1