intlify / nuxt3

Nuxt 3 Module for vue-i18n-next

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

__VUE_I18N__ is undefined in produciton mode

upgreidas opened this issue · comments

If I want access vueApp.VUE_I18N.global.t or vueApp.VUE_I18N.global.locale it works only when I run npm run dev. In production mode it gives "Cannot read properties of undefined (reading 'global')" error.

My dependencies:
"@intlify/nuxt3": "^0.2.3",
"nuxt": "3.0.0-rc.6",

I'm using nuxt 3.0.0-rc.11 and @intlify/nuxt3 0.2.4. Same issue.:
[unhandledRejection] Cannot read properties of undefined (reading '$i18n')
Can not deploy or generate static site.

Update:
I resolved my issue using:
import { useI18n } from 'vue-i18n'