Charmatzis / react-leaflet-google

GoogleMaps layer as React component for Leaflet | This repo is obsolete. Plz, use https://github.com/TA-Geoforce/react-leaflet-google
https://github.com/TA-Geoforce/react-leaflet-google
MIT License
29 stars 60 forks source link

Avoid loading google maps twice, fixes #6 #7

Closed ivorbosloper closed 7 years ago

ivorbosloper commented 7 years ago

Make google-maps an external dependency

Charmatzis commented 7 years ago

So, If we change the package.json we will stop having this problem?

ivorbosloper commented 7 years ago

I'm just learning to use these npm/webpack build tools, so I'm not 100% sure. I've tested this change in my project and it works.google-maps becomes an external dependency, just like react and react-leaflet. Now I can share the google-maps instance with another module. The package manager resolves this dependency. A user without module-loader has to include google maps with a default script include. So the problem is fixed...