timdown / rangy

A cross-browser JavaScript range and selection library.
MIT License
2.23k stars 367 forks source link

Browserify #310

Open agjs opened 9 years ago

agjs commented 9 years ago

I can't seam to require rangy anymore and compile it with Brwoserify ? I can manage to require the core file but not the require("./bower_components/rangy/lib/rangy-selectionsaverestore.js");

Any help please ?

timdown commented 9 years ago

Works fine for me. That path looks wrong though: there's no lib directory in the Bower package.

RobeeeJay commented 7 years ago

Just had the same issue, only way I could fix it was to create a package.json and add the path to the parent directory to Browserify.

I imagine it could be fixed in the code by requiring the core module with require("./rangy-core.js") instead of by module name.