-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Do not rely on global L #984
base: master
Are you sure you want to change the base?
Conversation
inject({ | ||
L: "leaflet" | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This injects L
to each file and assigns it import "leaflet"
globals: { | ||
"leaflet": "L" | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This tells UMD wrapper to resolve leaflet
with global L
Wicked! ;) I have no time to test it right now, but I will eventually. Interesting to see what @IvanSanchez has to say to it. The whole leaflet ecosystem needs a serious ES6 overhaul with a major new release. |
This can be reverted once this PR gets merged: Leaflet/Leaflet.markercluster#984
@IvanSanchez is there any way to get your review on this? That'd be awesome! |
Do not rely on global L (pull request #984) (Leaflet/Leaflet.markercluster#984) according to [@m1gu3l](https://github.com/m1gu3l)) fix issue #874 (Does not work with ES6 imports for leaflet)
I am sorry for bumping this, but is there any news? |
Any way to get this merged? Thanks. |
@ykzeng sorry to bother you, but could you please provide feedback on this PR? |
Works great for me 👍 |
Using this change in our fork since ages. |
@mourner could you make me a collaborator so I can review PRs on this repo? |
Hi @IvanSanchez could you kindly help review this to make sure this is compliant with the plugin guideline? Would love to merge this or hear from you otherwise, I can certainly help if any other update will be needed as you might suggest. |
I am currently too busy with work on core Leaflet, so I will not have time to review this work anytime soon. I do intend to refactor most if not all of the official Leaflet plugins once we have a solid idea of what the API surface for Leaflet 2.0 will be. |
np @jonkoops let's stay in touch if you need any help hand |
@m1gu3l Thank you for your PR. After over a day of pulling my hair out trying to figure out why clustering was so broken between remix, react-leaflet-cluster, and leaflet.markercluster, your solution worked perfectly on the first try. I was able to use it by :
Here's hoping the issue can be resolved in the package itself, at which point I can switch back and nuke the fork. |
@IvanSanchez @jonkoops it's a small PR and could fix some uncanny issues with the plugin. Please find 15 minutes to review it. |
Should fix #874