Open peterbrinck opened 9 months ago
Thanks for this one, if anyone wants to make a PR for this one I appreciate it!
My fix:
import { i18nVue } from "laravel-vue-i18n"
...
.use(i18nVue as any, {
resolve: async (lang: string) => {
const langFiles = import.meta.glob('../../../lang/*.json');
return await langFiles[`../../../lang/${lang}.json`]()
}
})
.mount(el)
Hi! 👋
I kept getting some errors (
No overload matches this call.
/Type 'ObjectPlugin<any[]>' is not assignable to type 'Plugin'
) when building my application with TypeScriptIt seems that Vue excepts the plugin to be the type
ObjectPlugin
buti18nVue
is typePlugin
I'm not that strong in TypeScript, so I don't have a clear idea if it's on purpose or anything, but I managed to fix it by casting the plugin as anObjectPlugin
My fix:
Error output from the build command: