mourner / rbush

RBush — a high-performance JavaScript R-tree-based 2D spatial index for points and rectangles

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can you provide a browserify distribution?

hoogw opened this issue · comments

commented

I have tried browserify, but run into error as
can you provide a browser version of it?

                        browserify index.js --s rbush -o dist/rbush.js  

                        /Users/nicole/node/rbush/index.js:1
                       import quickselect from 'quickselect';
                      ^
                       ParseError: 'import' and 'export' may appear only with 'sourceType: module'

There's already a browser version distributed, e.g. https://unpkg.com/rbush@3.0.1/rbush.js