-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
remove @kbn/presentation-containers from synthetics page load bundle (#…
…189533) #189128 increases @kbn/presentation-containers size. This causes synthetics page load bundle to exceed the bundle size limit. Synthetics page load should not include @kbn/presentation-containers. This PR resolves the problem by putting @kbn/presentation-containers load behind an async import Note for reviewers, put compatibility check into its own file to avoid importing entire @kbn/presentation-containers into async bundle. Tree shaking is enable by putting the import in a seperate file - see #189206 (comment) for more details
- Loading branch information
Showing
2 changed files
with
19 additions
and
3 deletions.
There are no files selected for viewing
15 changes: 15 additions & 0 deletions
15
...servability_solution/synthetics/public/apps/embeddables/ui_actions/compatibility_check.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import { apiIsPresentationContainer, PresentationContainer } from '@kbn/presentation-containers'; | ||
import { EmbeddableApiContext } from '@kbn/presentation-publishing'; | ||
|
||
export const compatibilityCheck = ( | ||
api: EmbeddableApiContext['embeddable'] | ||
): api is PresentationContainer => { | ||
return apiIsPresentationContainer(api); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters