perliedman / geojson-path-finder

Find shortest path through a network of GeoJSON
https://www.liedman.net/geojson-path-finder/
ISC License
300 stars 86 forks source link

Update topology.js and dijkstra.js #69

Closed eric183 closed 3 years ago

eric183 commented 3 years ago

https://codesandbox.io/s/8y2f7?file=/src/index.js

Here's the sandbox reappearing this error

perliedman commented 3 years ago

This is an ongoing problem when you bundle with Webpack (which I guess is where you encounter this?), see for example https://github.com/webpack/webpack/issues/4742. Applying your fix will unfortunately break the module for anyone not using Webpack, which is not acceptable.

I would be happy to make changes to for example package.json to work around this if possible, but fiddling with normal, working CommonJS requires simply is not something I think I should be responsible for as a module maintainer.