Where to `defineCustomElements(window);` in ionic vue photogallery app?

Viewed 1001

I have started learning ionic vue. I was following this link . But i am stuck here Next, import @ionic/pwa-elements by editing src/main.ts.

// Above the createApp() line
import { defineCustomElements } from '@ionic/pwa-elements/loader';

// Call the element loader after the platform has been bootstrapped
defineCustomElements(window);

My question is where do I put the following line?

// Call the element loader after the platform has been bootstrapped
defineCustomElements(window);

I tried this but id does not work

router.isReady().then(() => {
  app.mount('#app');
  defineCustomElements(window);
});
1 Answers

Just like import line, Above the createApp() line

import { defineCustomElements } from '@ionic/pwa-elements/loader';
defineCustomElements(window);

const app = createApp(App)
  .use(IonicVue)
  .use(router);
Related