fix(unplugin-vue-i18n): check for vue compiler in directive transform hook#421
Conversation
| vuePluginOptions, | ||
| translationIdentifiers | ||
| ) | ||
| } |
There was a problem hiding this comment.
should we set vuePluginOptions to null if missing compiler?
There was a problem hiding this comment.
Ah, yeah!
vue-i18n directive does not work without Vue compiler for SSR.
if Vue compiler is not specify on vitejs/plugin-vue, unplugin-vue-i18n should output warning.
(I recognize vitejs/plugin-vue has Vue compiler as default)
There was a problem hiding this comment.
Oh that's true, it is about the v-t directive, I'm going to check if ssr is exposed.
If this is only a vite plugin why not just expose the transform hook inside vite?
|
closing this, it is a bug in @vitejs/plugin-vue, compiler not being initialized correctly: vitejs/vite-plugin-vue#475 |
|
@kazupon @BobbieGoede looks like Vite Vue plugin PR will take some time, I guess we can use the protection in this PR to avoid the error in Nuxt calling Vite warmup. |
|
I agree we probably need to skip transform if the compiler is unset, it seems like both devtools ( Related nuxt-modules/i18n#3241 |
resolves #420