Closed coderfreii closed 2 months ago
I made it in another way.
export default defineNuxtPlugin({
enforce: "pre",
dependsOn:['i18n:plugin'],
setup: async (nuxtApp) => {
console.log("pre plugin");
const app = useNuxtApp()
console.log(app.$i18n.locale.value);
Describe the feature
"I want to make sure the useI18n function is accessible during the pre Nuxt plugin setup phase to improve SEO with remote async data. now I just get a error ‘Must be called at the top of a
setup
function’"usage:
Additional information
Final checks