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
After the named export pathToGeoJSON was added it has become hard to use the module in node.js without a bundler (rollup/webpack) as the mixing of default and named exports requires multiple steps to import the default export in barebones node.js. The problem is discussed here rollup/rollup#1961 (comment)
In our case we use both a bundler and node.js worker threads to calculate the path-finder graph in a worker thread, so to reuse the code to construct the path finder we have to do this to be able to handle the import in both scenarios.
Hi @pbvahlst, sorry about not getting back to you on this before.
Supporting both CJS and ESM through various bundlers continues to be a real pain!
To avoid breaking compatibility and forcing a new major version upgrade, I guess we could use your second suggestion, using both default exports as well as named exports.
An unrelated question, you seem to use this library quite a lot and have posted some nice replies. How would you feel about being added as a maintainer? Personally, I only use geojson-path-finder in a project that is currently in "low maintenance" mode, so I don't get to spend much time on it...
Thanks for the nice offer
I am currently wrapping up the project where I used geojson-path-finder and am moving on to a new project without a path-finder requirement, so I will not use the package that much for the next period of time. (sadly, it has been a lot of fun).
If a new project comes up with path-finder requirements I will be have to help out if the offer still stands.
If you wish I will keep helping answering questions when needed.
After the named export
pathToGeoJSON
was added it has become hard to use the module in node.js without a bundler (rollup/webpack) as the mixing of default and named exports requires multiple steps to import the default export in barebones node.js. The problem is discussed here rollup/rollup#1961 (comment)In our case we use both a bundler and node.js worker threads to calculate the path-finder graph in a worker thread, so to reuse the code to construct the path finder we have to do this to be able to handle the import in both scenarios.
is it possible to change to all named exports. Or maybe just rewrite the export to have both a default export and named export PathFinder?
The text was updated successfully, but these errors were encountered: