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
Importing Leaflet 1.5.0 fails #6645
Comments
@marufkilic can you publish minimal example, which reproduces the issue? |
Above two classes can produce the error. It is enough to render the MapPanel component in a main React component. |
Looks like there's no default export in leaflet@1.5.0 |
Caused by line:
at the end of leaflet-src. This probably changed in rollup, which we updated in #6635 |
Also added webpack config |
Quick workaround on users side: - import L from 'leaflet';
+ import * as L from 'leaflet'; |
cherniavskii
changed the title
ReactJS and Leaflet 1.5.0 fails
Importing Leaflet 1.5.0 fails
May 8, 2019
This was referenced May 8, 2019
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When using with react, leaflet 1.5.0 fails. However 1.4.0 works as expected
Code fails excatly at init function line "const map = L.map(mapName, { ..."
Class to render map
The init function
And the error
Webpack Config
The text was updated successfully, but these errors were encountered: