Open kazupon opened 1 year ago
We need test on @nuxtjs/i18n v7.3 code base + nuxt edge! If e2e test will be passed, we can release @nuxtjs/i18n v7.4
nuxt edge!
Why Nuxt Edge? I think it should work on latest stable.
We don't still announce officially 📢 I believe it is necessary for me to pass the e2e test to pass that it works correctly ✅
We don't support it officially, yes, but my question is: why do you think that we should be testing on "nuxt edge" rather than on the latest Nuxt 2 stable? Does latest stable not yet include needed functionality?
Nuxt Bridge is a nuxt module running on Nuxt2 (accurately, it's edge version called bynuxt-edge
).
Nuxt Bridge backports some features and APIs from Nuxt3.
This module is loosely coupled with Nuxt module. Although it should not do anything to affect Nuxt modules using other modules such as @nuxtjs/i18n, I think it's necessary to test that @nuxtjs/i18n works on Nuxt2 + Nuxt Bridge to assure that it works.
Then nuxt bridge should be released in a stable version first that supports stable nuxt 2 version.
Requiring nuxt-edge won't be an option for many production services that need to not randomly break.
Hi guys,
Is there any statusupdate on this issue? In the gh discussion I see the following line:
Fortunately, the latest stable version of nuxtjs/i18n, v7.2.2 works in the nuxt bridge environment as far as I have checked.
But for me, it's just spouting
vm.$t is undefined
when running with Vite. It does find it when running with webpack though. Any suggestions for a workaround maybe?
@kazupon something that I don't see mentionned is to backport Vite support too.
Bridge enables Vite in Nuxt 2 applications but @nuxtjs/i18n@7
doesn't enable Vite to parse custom <i18>
blocks in SPCs because vue-loader-i18n
only works for Webpack and unplugin-vue-i18n
is introduced in v8 which isn't compatible with Nuxt 2/Bridge
I wrote an issue about this in bridge but I'm starting to wonder whether I should have written it here instead of not https://github.com/nuxt/bridge/issues/1029
I tried installing unplugin-vue-i18n
manually and make it work with @nuxtjs/i18n@7
but I get a breaking error saying
Uncaught SyntaxError: The requested module '/_nuxt/node_modules/@nuxtjs/i18n/node_modules/ufo/dist/index.cjs?import&v=0a01e4b0' does not provide an export named 'hasProtocol' (at plugin.utils.js:2:1)
From what I understand, version 7 just isn't compatible with unplugin-vue-i18n
so installing it separetely and enabling it from the config like this doesn't work
vite: {
plugins: [
VueI18nPlugin.vite({})
]
},
Looks like Vite won't work until migrating to Nuxt 3 for the time beeing.
_Originally posted by @kazupon in https://github.com/nuxt-community/i18n-module/pull/1521#discussion_r975451777_