On my system, files larger than 64KB fail to work, as they are truncated. The issue seems to stem from reading only the first chunk on the `data` event rather than buffering everything and then returning the full result.
https://github.com/m90/esbuild-plugin-browserify-adapter/blob/main/index.js#L26
This should be fixed in 0.1.5 which I just released.
On a side note, I couldn't repro the 64kb limit on my machine, but had to artificially set a lower `highWaterMark` when reading. The bug was pretty obvious in any case, so the fix makes sense. Thanks for reporting.
Woot! Thanks for the awesomely fast fix! I was just about to work up a fork and pull request and you've solved it already. :-) Thanks!
Confirmed that it fixed the issue on my machine.