The browser can play any sound so why not MIDI files. To be clear, the default implementation here is that this uses a soft synth (FluidSynth) compiled to wasm to render MIDI to waveform data - this is not how browsers classically played MIDI through the OS sequencer. It does also support sending out MIDI data to external devices though.
I feel like the point of the article isn't so much "how do I solve this specific issue" as "this is the general state of JS packaging", and the solution you present doesn't work in the general case of larger, less trivial dependencies
But the thing is, the general problem of packaging is a complicated system, and the current solution developed are there to solve those complications (which adds more complications unfortunately).
However, the article wasn't about this general problem of package management. It's a problem of somebody wanting to test out some code, and went down the rabbit hole without understanding what they're doing (not a slight at them - it's hard to know what to do).
Ideally, you don't go down that route, because testing out some code doesn't require solving the packaging problem.
"What Is Clean Code?
There are probably as many definitions as there are programmers."
Robert C. Martin - Clean Code A Handbook of Agile Software Craftsmanship - p. 7
Interesting. I always assumed that to get the balancing feel right, a game would have to run huge parameterized test-suits to make sure win/lose results to user inputs are in balance.
I've always assumed they did this for games like LoL.
Bots already exist, so the foundation for automated play testing is in place. Take the basic AI and add some functionality to track the effectiveness of various skills or loadout across plays. Using A/B/n testing to choose the most effective character strategy would probably highlight overpowered loadouts within a few thousand game-test-hours.
They could probably take analytics from real players and do what's outlined above and get a reasonable idea of the impact a change will have.
The issue with that is that LOL bots are laughably bad, and making them not bad requires a substantial investment. But something like what you describe is possible. OpenAI has a paper where they evaluate chess variants by training AlphaZero on them and seeing which ones generate more balanced games between white vs black, and which ones lead to more dynamic games with fewer stalemates etc.
This is likely why "Game Tester" is an actual job, or at least used to be. 14 year old me didn't believe it was a real thing...
"Early Access" seems to be the more popular route now. People are happy to pay to test a game and feel like they participated in its development. Check out Star Citizen if you want to be amazed and depressed by this truth at the same time.
Sometimes it works well. Sometimes it doesn't. Seems largely dependent on how engaged the devs are with their community.