added tests to createPlugin, plus minor refactors
Co-authored-by: Patrik Oldsberg <poldsberg@gmail.com> Co-authored-by: Johan Haals <johan.haals@gmail.com> Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
@@ -43,7 +43,7 @@ export function createApp(options: { plugins: BackstagePlugin[] }): {
|
||||
// apply config to adjust default extension instances and add more
|
||||
const extensionParams = mergeExtensionParameters(
|
||||
[
|
||||
...options.plugins.flatMap(plugin => plugin.defaultExtensions),
|
||||
...options.plugins.flatMap(plugin => plugin.extensions),
|
||||
...builtinExtensions,
|
||||
],
|
||||
readAppExtensionParameters(appConfig),
|
||||
@@ -116,8 +116,8 @@ export function createApp(options: { plugins: BackstagePlugin[] }): {
|
||||
);
|
||||
return (
|
||||
<>
|
||||
{rootComponents.map(Component => (
|
||||
<Component />
|
||||
{rootComponents.map((Component, i) => (
|
||||
<Component key={i} />
|
||||
))}
|
||||
</>
|
||||
);
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* TODO
|
||||
* Core API used by Backstage frontend apps.
|
||||
*
|
||||
* @packageDocumentation
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user