-
Notifications
You must be signed in to change notification settings - Fork 0
chore: add template for dynamic plugins #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Frank Kong <frkong@redhat.com>
Signed-off-by: Frank Kong <frkong@redhat.com>
| import { version as frontendDynamicFeatureLoader } from '../../../frontend-dynamic-feature-loader/package.json'; | ||
| import { version as frontendPluginApi } from '../../../frontend-plugin-api/package.json'; | ||
| import { version as backendDefaults } from '../../../backend-defaults/package.json'; | ||
| import { version as backendDynamicFeatureService } from '../../../backend-dynamic-feature-service/package.json'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When PR backstage#30967 is merged (hopefully), you would need to add the new @backstage/module-federation-common package introduced by this PR.
|
|
||
| ```bash | ||
| cd /path/to/your-frontend-plugin | ||
| yarn build --role frontend-dynamic-container |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When PR backstage#30967 is merged (hopefully), we would be able to change this to yarn build --module-federation
packages/create-app/templates/dynamic-plugins-next-app/dynamic-plugins-root/README.md
Outdated
Show resolved
Hide resolved
packages/create-app/templates/dynamic-plugins-next-app/dynamic-plugins-root/README.md
Outdated
Show resolved
Hide resolved
packages/create-app/templates/dynamic-features-next-app/packages/backend/package.json.hbs
Outdated
Show resolved
Hide resolved
packages/create-app/templates/dynamic-features-next-app/packages/backend/package.json.hbs
Show resolved
Hide resolved
packages/create-app/templates/dynamic-features-next-app/packages/backend/package.json.hbs
Outdated
Show resolved
Hide resolved
packages/create-app/templates/dynamic-plugins-next-app/app-config.yaml.hbs
Show resolved
Hide resolved
packages/create-app/templates/dynamic-plugins-next-app/app-config.yaml.hbs
Outdated
Show resolved
Hide resolved
Signed-off-by: Frank Kong <frkong@redhat.com>
Signed-off-by: Frank Kong <frkong@redhat.com>
Signed-off-by: Frank Kong <frkong@redhat.com>
Signed-off-by: Frank Kong <frkong@redhat.com>
Signed-off-by: Frank Kong <frkong@redhat.com>
|
|
||
| export default createApp({ | ||
| features: [ | ||
| catalogPlugin, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't we conclude that we wanted to have:
- catalog,
- search,
- scaffolder,
- techdocs
- catalog-import ?
?
| "@backstage/plugin-catalog": "^{{ version '@backstage/plugin-catalog'}}", | ||
| "@backstage/plugin-notifications": "^{{ version '@backstage/plugin-notifications'}}", | ||
| "@backstage/plugin-org": "^{{ version '@backstage/plugin-org'}}", | ||
| "@backstage/plugin-scaffolder": "^{{ version '@backstage/plugin-scaffolder'}}", | ||
| "@backstage/plugin-search": "^{{ version '@backstage/plugin-search'}}", | ||
| "@backstage/plugin-signals": "^{{ version '@backstage/plugin-signals'}}", | ||
| "@backstage/plugin-user-settings": "^{{ version '@backstage/plugin-user-settings'}}", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be removed isn't it ?
packages/create-app/templates/dynamic-features-next-app/packages/app/README.md
Outdated
Show resolved
Hide resolved
| To run the example frontend, first go to the project root and run | ||
|
|
||
| ```bash | ||
| yarn install | ||
| ``` | ||
|
|
||
| You should only need to do this once. | ||
|
|
||
| After that, go to the `packages/app` directory and run | ||
|
|
||
| ```bash | ||
| yarn start | ||
| ``` | ||
|
|
||
| The frontend starts up on port 3000 per default. | ||
| For more information on setting up the new frontend system, see the [Backstage documentation](https://backstage.io/docs/frontend-system/). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not really true.
With Dynamic plugins, the frontend should be started from the backend, in order to also inject the additional config schemas of the dynamic plugins.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah I guess I should just explicitly mention that dynamic plugins need the backend to be running to properly work as well.
packages/create-app/templates/dynamic-features-next-app/packages/backend/package.json.hbs
Outdated
Show resolved
Hide resolved
packages/create-app/templates/dynamic-features-next-app/packages/backend/README.md
Outdated
Show resolved
Hide resolved
Signed-off-by: Frank Kong <frkong@redhat.com>
…mic-plugins-template
Hey, I just made a Pull Request!
This PR introduces a new create-app template (dynamic-plugins-next-app) that scaffolds a Backstage application pre-configured with dynamic plugins support using the new frontend system and module federation.
Having a default template with dynamic plugins already setup is the first step in helping expose this feature to more users and make it easier for the community to experiment and contribute to this area.
The
frontend-dynamic-feature-loaderandbackend-dynamic-feature-servicewill function as no-op features when loaded without any configurations so this would not be a breaking change if the user ends up not using these features.How to test:
✔️ Checklist
Signed-off-byline in the message. (more info)