s00d / nuxt-i18n-micro

Nuxt I18n Micro is a fast, simple, and lightweight internationalization (i18n) module for Nuxt
https://s00d.github.io/nuxt-i18n-micro/
MIT License
87 stars 11 forks source link

$cookies is type of uknown while using i18n micro #27

Closed kleinpetr closed 1 month ago

kleinpetr commented 1 month ago

Hi I've opened issue under the Cookie control repository, but posting it here as well since it could be possible that i18n micro somehow rewrites provided variables to the nuxtApp just fyi

https://github.com/dargmuesli/nuxt-cookie-control/issues/235

dargmuesli commented 1 month ago

Just from reading the issue description, I suspect it's related to https://github.com/s00d/nuxt-i18n-micro/blob/8a668d4e1cb37b5286c63f20ab16738eabc5f477/src/runtime/plugins/01.plugin.ts#L417 which I think should be removed as described in the changelog for Nuxt 3.13.0. Augmenting vue might be enough.

kleinpetr commented 1 month ago

ok it might be, but the strange thing is, that the typecheck passes when there is cookie module itself, once I add i18n-micro module it fails. So it seems like the i18n would somehow rewrites provided values to nuxtApp context imo

s00d commented 1 month ago

So, I’ve removed all types for now in version v1.21.5.

Let’s see how it works. If anyone can help with setting up typing in Nuxt, I’d be really grateful. It’s been working terribly, and I spent about 10 hours looking for examples and studying the documentation, but I couldn’t figure it out, and nothing works. For now, types will be handled through composables.

kleinpetr commented 1 month ago

So, I’ve removed all types for now in version v1.21.5.

Let’s see how it works. If anyone can help with setting up typing in Nuxt, I’d be really grateful. It’s been working terribly, and I spent about 10 hours looking for examples and studying the documentation, but I couldn’t figure it out, and nothing works. For now, types will be handled through composables.

Yes, it seems to be fixed now. Thank you