plugin-new-frontend-system-support
Adding New Frontend System Support to an Existing Plugin
This skill helps add new frontend system (NFS) support to an existing Backstage plugin while keeping the old system fully functional. The result is a plugin that works in both old and new apps via a dual entry point pattern.
This is the preferred approach for published plugins or plugins that are used by external parties, since it avoids forcing consumers to migrate their app before they are ready.
It is highly recommended to be on Backstage version 1.49.x or above before starting this, although not mandatory, you may face issues with some of the instructions below. This can be verified by looking in the backstage.json file in the root of the repository.
Key Concepts
- Dual entry point: The plugin keeps its existing
src/plugin.ts(old system) and adds a newsrc/alpha.tsx(new system) - Old system:
createPluginfrom@backstage/core-plugin-api, pages viacreateRoutableExtension, routes defined in the app - New system:
createFrontendPluginfrom@backstage/frontend-plugin-api, pages viaPageBlueprint, routes owned by the plugin - Dual header pattern: Old system uses
Page/Header/PageWithHeaderfrom@backstage/core-components; new system relies on the framework'sPageLayoutwhich rendersPluginHeaderfrom@backstage/ui— so NFS page components should NOT include their own page shell
Step 1: Create the Alpha Entry Point
Create src/alpha.tsx (or src/alpha/index.ts for larger plugins) with a createFrontendPlugin default export: