Open johnmal-dev opened 2 weeks ago
@johnmal-dev I was running into this same issue and looked into it more.
It seems that the pathfinding
package that this library uses errors when trying to use smoothenPath
function.
I get the error ReferenceError: assignment to undecalred variable lastValidCoord: smoothenPath Util.js:167
when I look at the code there, they don't declare the variables with var, let, or const so it is errors.
But this error only happens in dev mode, if you make a production build, it will ignore it and work.
Definitely annoying but this is a bug on the pathfinding
package and not this one.
I am assuming CRA ignores these errors in dev as well.
Describe the Bug
After switching to vite, the
SmartBezierEdge
edges don't work as intended.Findings:
I attempted to install the most basic setup with and without vite.
I tried using React dev tools to see if there were any noticeable differences.
I found that when moving the nodes around, the
vite
project'sSmartEdge
children would alternate between:SmartEdge > BaseEdge
SmartEdge > BezierEdge > BaseEdge
In the
cra
project, theSmartEdge
children stayed as:SmartEdge > BaseEdge
Minimal Example
https://github.com/johnmal-dev/react-flow-vite
Steps to Reproduce the Bug or Issue
Expected behavior
I expect the edges to avoid collisions
Screenshots or Videos
Platform
Additional context
No response