Closed soryy708 closed 3 years ago
I found a workaround: https://github.com/mourner/rbush-knn/issues/18#issuecomment-616130211
Add this to the Webpack config:
resolve: {
alias: {
"tinyqueue": path.join(__dirname, 'node_modules', 'tinyqueue', 'tinyqueue.js')
}
}
Nice! I think this issue comes up a lot when mixing Webpack with CommonJS and ESM. From my understanding, it's really hard to fix on the module author side, so I think your workaround is the best I've seen so far!
I'm closing this, since it seems resolved, but can open again if there's something more that can be done on the module side!
If I bundle using Webpack and I
import
this library, when I callfindPath
on an instance ofPathFinder
I get the following error:in the
dijkstra.js
file