fawmi / vue-google-maps

Reactive Vue 3 components for Google maps
https://vue-map.netlify.app
MIT License
195 stars 99 forks source link

Nuxt 3 Issues #188

Open geofany opened 1 year ago

geofany commented 1 year ago

When i using Lastest Version @fawmi/vue-google-maps^0.9.79 it's show error

Screenshot 2023-06-12 at 21 08 43

same like this Issues #164 the solution there is to downgrade Version to @fawmi/vue-google-maps^0.9.72

And it's work!

but shown another Warning Messages

Screenshot 2023-06-12 at 21 10 17

same like this Issues #144 the problem is @googlemaps/markerclustererplus is deprecated and need to change to @googlemaps/markerclusterer which is available on @fawmi/vue-google-maps^0.9.79

then what i'm supposed to do ?

i can use version ^0.9.72 and running well but the warning is so annoying

SedlakMarcel commented 1 year ago

Adding this to vite.config.ts worked for me.

optimizeDeps: {
    include: ["@fawmi/vue-google-maps", "fast-deep-equal"],
  },

Im using the latest version 0.9.79.

mattbroekhuis commented 1 year ago

vite can be configured right in the nuxt.config file

//nuxt.config file
 vite: {
    optimizeDeps: {
      include: ['@fawmi/vue-google-maps', 'fast-deep-equal'],
    },
MaxBeyer commented 1 year ago

vite can be configured right in the nuxt.config file

//nuxt.config file
 vite: {
    optimizeDeps: {
      include: ['@fawmi/vue-google-maps', 'fast-deep-equal'],
    },

To add to this, when using Nuxt 3 with this dependency, you MUST add this in the nuxt.config.ts file. Nuxt will ignore it if you add it to the vite.config.ts file, and you'll continue to get the error locally.

This fixed my issue using version 0.9.79 and Nuxt 3.5.3.