w8r/avl

Tree is not a function

Closed this issue · 3 comments

I am seeing an error
TypeError: Tree is not a function
I am using it in react after importing it.
import Tree from 'avl';

w8r commented

Which webpack version do you use?

Currently I am using

Webpack 4.30.0

In src/findIntersections.js
I updated the code to this
var Tree = require('avl/dist/avl')

Then it worked because I can import Tree directly in my React project actually it's used in different library where he was importing anyway **avl/dist/avl** works fine
Here is the other repository link
https://github.com/ggolikov/bentley-ottman/blob/master/src/findIntersections.js