devstark-com / vue-google-charts

Reactive Vue.js wrapper for Google Charts lib
446 stars 73 forks source link

Nuxt3 configuration #224

Open SamG92 opened 1 year ago

SamG92 commented 1 year ago

Hello,

How do you properly use vue-google-charts in Nuxt3? I got it to work with plugins:

plugins/gchart.client.ts:
import { GChart } from "vue-google-charts";
export default defineNuxtPlugin((nuxtApp) => {
  nuxtApp.vueApp.component("GChart", GChart);
});

but sometimes I get the following warning in dev environment: "[Vue warn]: Failed to resolve component: GChart" and it crashes in build generate environment.

Thanks for your help!