__VUE_I18N__ is undefined in produciton mode
upgreidas opened this issue · comments
upgreidas commented
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",
Ümit Kara commented
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'