Closed devolt5 closed 2 years ago
While EUI ships transpiled code, it intentionally does not include polyfills. This is so the component library does not dictate to consuming applications what polyfill to use, or potentially bloat the final bundle by including multiple versions of a polyfill.
However, we should address this in the starter project!
In other projects, polyfills can be added with:
import "core-js/stable";
import "regenerator-runtime/runtime";
as documented in https://github.com/zloirock/core-js/blob/master/docs/2019-03-19-core-js-3-babel-and-a-look-into-the-future.md#babelpolyfill, and for reference we do this in Kibana - https://github.com/elastic/kibana/blob/main/packages/kbn-ui-shared-deps-src/src/polyfills.js#L9-L10
It seems, that by adding EUI Components, other Objects are not defined.
E.g. if you add a
<EuiDataGrid />
anywhere, you'll get:I'm sure there any much more EUI Components which different missing Objects. What's the workflow for dealing with this issue?