Open yapro opened 8 years ago
Probably due to the fact that the module tries to require buffertools but fails?
try {
deeper.fastEqual = require('buffertools').equals
} catch (e) {
// whoops, nobody told buffertools it wasn't installed
}
Most definitely an issue for people using bundlers like browserify or webpack, aka ~95% of the frontend developers community :)
Shooting in the dark here, but I wonder if something like global["require"]("buffertools")
or similar hack would prevent bundlers to parse the statement at compilation time? (yeah, that's ugly anyway)
Maybe a cleaner way would be to expose two different entry points, one expecting buffertools
to be available and the other not, so you could import either deeper
or deeper/no-buffertools
.