-
Notifications
You must be signed in to change notification settings - Fork 133
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
Webpack, AMD, CommonJS... which one are you using? #115
Comments
By the way a found a solution by myself but it's more an hack that puts the issue in evidence: import L from "leaflet/dist/leaflet-src.js";
var PruneCluster = require("imports?L=leaflet/dist/leaflet-src.js!exports?PruneCluster!prunecluster/dist/PruneCluster.js"); I found out this by reading this docs. However there would be no need if you stick to some standard module definitions. |
Hi,
We could add support for AMD or CommonJS the same way Leaflet does, a PR is welcome. |
That's correct: there is some additional code required to support module definition, just like Leaflet does. However there are obvious advantages when integrating the library in a wider project. Also UMD is an option. I'll see what I can do, given that I'm not familiar with TypeScript at all, in order to make a PR. |
Any updates on this? |
It's on the TODO list. |
Using webpack export loader, add this line to your javascript.
|
@gtanguay may not be obvious to some:
|
Any update on this? I have been using the fork proposed at #161 pull request since 2018. |
Hei @pedroetb This project has been on pause for a few years, mostly because I left the company and no one took over. I hope to resume the development at some point and modernize it, but I cannot give a timeline because I don't have a budget for that yet. Things has changed with now MapBoxGLJS/MapLibre or Deck.gl. Meanwhile you can continue to use the fork if it still work. |
I'm having troubles importing PruneCluster into my webpack project. None of these is working! Always undefined. It seems like the library does not follow any convention, while Leaflet does.
Leaflet
I guess you should do something about it...
The text was updated successfully, but these errors were encountered: