feat(react): add custom elements bundle (#23896)

This commit is contained in:
Liam DeBeasi
2021-09-13 14:53:28 -04:00
committed by GitHub
parent d1763fc8b5
commit c50d895370
57 changed files with 321 additions and 565 deletions

View File

@ -1,4 +1,4 @@
import { defineCustomElements } from '@ionic/core/loader';
import { initialize } from '@ionic/core/components';
import { addIcons } from 'ionicons';
import {
arrowBackSharp,
@ -34,6 +34,7 @@ export {
mdTransitionAnimation,
NavComponentWithProps,
setupConfig,
initialize,
IonicSwiper,
SpinnerTypes,
@ -60,7 +61,7 @@ export {
ToastOptions,
ToastButton
} from '@ionic/core';
} from '@ionic/core/components';
export * from './proxies';
export * from './routing-proxies';
@ -122,8 +123,13 @@ addIcons({
'search-sharp': searchSharp,
});
// TODO: defineCustomElements() is asyncronous
// We need to use the promise
if (typeof window !== 'undefined') {
defineCustomElements(window);
}
/**
* By default Ionic Framework hides elements that
* are not hydrated, but in the CE build there is no
* hydration.
* TODO: Remove when all integrations have been
* migrated to CE build.
*/
document.documentElement.classList.add('ion-ce');
initialize();