mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-16 01:52:19 +08:00
fix(react, vue): remove sideeffects to improve treeshaking (#24313)
This commit is contained in:
@ -51,7 +51,7 @@ const getElementClasses = (ref: Ref<HTMLElement | undefined>, componentClasses:
|
||||
*/
|
||||
export const defineContainer = <Props>(
|
||||
name: string,
|
||||
customElement: any,
|
||||
defineCustomElement: any,
|
||||
componentProps: string[] = [],
|
||||
modelProp?: string,
|
||||
modelUpdateEvent?: string,
|
||||
@ -63,12 +63,8 @@ export const defineContainer = <Props>(
|
||||
* They refer to whatever properties are set on an instance of a component.
|
||||
*/
|
||||
|
||||
if (
|
||||
customElement !== undefined &&
|
||||
typeof customElements !== 'undefined' &&
|
||||
!customElements.get(name)
|
||||
) {
|
||||
customElements.define(name, customElement);
|
||||
if (defineCustomElement !== undefined) {
|
||||
defineCustomElement();
|
||||
}
|
||||
|
||||
const Container = defineComponent<Props & InputProps>((props: any, { attrs, slots, emit }) => {
|
||||
|
Reference in New Issue
Block a user