Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mapbox-gl neccessary dependency? #126

Closed
jeroenkampinga opened this issue Sep 24, 2021 · 1 comment
Closed

mapbox-gl neccessary dependency? #126

jeroenkampinga opened this issue Sep 24, 2021 · 1 comment

Comments

@jeroenkampinga
Copy link

jeroenkampinga commented Sep 24, 2021

I'm using react-map-gl-geocoder in combination with react-map-gl. When inspecting my bundle I see mapbox-gl.js is bundled twice. Once from react-map-gl and once as (peer)dependency from react-map-gl-geocoder. Is there a way to remove the duplicate code when combining this package with react-map-gl

bundle
e.

@SamSamskies
Copy link
Owner

I'm not sure, but this project is pretty much in maintenance mode, so you could just copy pasta the code into your codebase instead of installing it as a dependency. It's only one file. I've always purposely kept all the code in one file to make it easy to copy pasta. Everything you need is in this file https://github.com/SamSamskies/react-map-gl-geocoder/blob/master/src/index.js.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants