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
Just shift my project to ES Modules. I intend to import modules separately from Leaflet. But got some strange results. After struggled with the error, I finally found it's due to circular dependencies.
For the example above, moving CRS.Earth in crs/index.js to the first item solves the problem.
While since the doc page lists 'Modular build system' as a feature, I am not sure if that is an ideal solution.
How to reproduce
CRS.Earth.js
What behaviour I'm expecting and which behaviour I'm seeing
CRS should exist. However I got
undefined
;Minimal example reproducing the issue
Using http://leafletjs.com/edit.html or any other jsfiddle-like site.
Just shift my project to ES Modules. I intend to import modules separately from Leaflet. But got some strange results. After struggled with the error, I finally found it's due to circular dependencies.
For the example above, moving
CRS.Earth
in crs/index.js to the first item solves the problem.While since the doc page lists 'Modular build system' as a feature, I am not sure if that is an ideal solution.
Btw, I found this tool is useful: https://github.com/pahen/madge
The result:
Will you deem it a problem? Or should I import the
Leaflet.js
directly?The text was updated successfully, but these errors were encountered: