You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For users upgrading to this release, this change should not make a difference, while it offers the possibility to import individual parts of Leaflet individually if your app is built with ES6.
Ok, let's go.
import {Map} from 'leaflet'; //npm package let map = new Map(id,{zoom:0, center:{lat:0,lng:0}});
It works but in the browser console, i see the global L with all features and when I build my app (webpack), the whole library is injected.
It seems to me that the objective is to reduce the size by eliminating the features that one does not need, I'm wrong ?
The text was updated successfully, but these errors were encountered:
This is ongoing work that is not yet completely finished. The main problem at the moment is making sure people can use Leaflet with module imports, but still also use Leaflet plugins that wasn't written with modules or any bundler in mind. That quickly gets tricky.
I'm going to close this for now, and direct you to the discussion in #5620, which hopefully will resolve the issue you're seeing. A similar point is also made in #5489 (comment).
In the release note you say:
Ok, let's go.
import {Map} from 'leaflet'; //npm package
let map = new Map(id,{zoom:0, center:{lat:0,lng:0}});
It works but in the browser console, i see the global L with all features and when I build my app (webpack), the whole library is injected.
It seems to me that the objective is to reduce the size by eliminating the features that one does not need, I'm wrong ?
The text was updated successfully, but these errors were encountered: