Closed acmiyaguchi closed 3 years ago
Wow thanks @acmiyaguchi! This all looks great, truly appreciate your contribution. I know that require('fs')
has been a thorn in some people's sides for a while.
Agree that docs should be handled differently so they're not always mixed up with code changes.
I'm still having he issue with fs module not found because this PR was merged to master without a release. Do you know when the next release is planned?
Hey @vinzentt, thanks for the reminder. I just published 2.0.14 to npm which includes this change.
Thanks for this great package! I've had fun using it so far, and it's one of the few packages in the ecosystem that fits my needs.
I'm using a browser bundler for my application, so the current set of builds are problematic. When I use
npm install midi-player-js
for my web app, it also includes therequire("fs")
statement inloadFile
. I did a couple things to resolve this:loadFile
that rollup eliminates as a dead branch when being built for the browserbuilds/index.browser.js
. I add this to the package.json underbrowser
so my bundler grabs the correct distribution.I also removed the build directory from check ins. I left the browser directory alone, in case the github raw link was being used to source the script.
This works as expected in a small test page I made.