Conversation
| inject({ | ||
| L: "leaflet" | ||
| }) |
There was a problem hiding this comment.
This injects L to each file and assigns it import "leaflet"
| globals: { | ||
| "leaflet": "L" | ||
| } |
There was a problem hiding this comment.
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. |
|
Thank you for this. For anyone who comes behind me, I forked the repo, added this repo as a remote and pulled this GH PR branch. Then using docker I built the code: From there the dist folder was created and the new js file seems to work in my initial test with a Rails Stimulus controller. |
Should fix #874