mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-16 01:52:19 +08:00
feat(react): add custom elements bundle (#23896)
This commit is contained in:
@ -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();
|
||||
|
Reference in New Issue
Block a user