reactjsleafletreact-leafletreact-leaflet-v3

Using react leaflet version3 gave this kind of errors


Module parse failed: Unexpected token (3:0) You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders | / required styles / |

.leaflet-pane, | .leaflet-tile, | .leaflet-marker-icon,

i have tried many solution but nothing changes i am stuck here for 3 hours


Solution

  • Take a look here: https://blog.logrocket.com/react-leaflet-tutorial/

    Replace the "browserslist" values in the package.json