ionic icon indicating copy to clipboard operation
ionic copied to clipboard

Incorrect Warning on Nuxt 3.10

Open evanlegamer opened this issue 1 year ago â€ĸ 2 comments

📚 What are you trying to do?

I'm just trying to use Ionic router. It's working correctly but I got an error.

image

🔍 What have you tried?

I tried to disable pages by putting in nuxt.config.js :

pages: false

everything stop to work correctly, so the advice they give in the warning is incorrect also.

â„šī¸ Additional context

No response

evanlegamer avatar Mar 11 '24 06:03 evanlegamer

📚 What are you trying to do?

I'm just trying to use Ionic router. It's working correctly but I got an error.

image

🔍 What have you tried?

I tried to disable pages by putting in nuxt.config.js :

pages: false

everything stop to work correctly, so the advice they give in the warning is incorrect also.

â„šī¸ Additional context

No response

I tried it too, but I guess the problem is that maybe the Ionic Vue router wasn't made to work without page integration. Worry not, I will look into it, and see if I can get something out of it, but for now try and work with pages: true

chibx avatar Mar 26 '24 08:03 chibx

@evanlegamer I also noticed in the Vue Devtools that Nuxt wraps the base element with NuxtRoot to properly inject helper props which would help in a normal Nuxt 3 application. But when you use the NuxtLayout or NuxtPage in an Ionic app, then problem could start along the way. When you use NuxtLayout with IonRouterView, the browser console should show a warning that a provide() couldn't be found for an inject() in the IonRouterView component. Also, the other way around, if you don't provide the IonApp, then various Ionic default animation and features won't work well

chibx avatar Mar 26 '24 08:03 chibx