Oh, this is for Nodejs.
I forget that people use Nodejs. That's why everybody always has so much trouble.
The ESM stuff is easy if you're using any bundler for running stuff in the browser.
Assuming you were able to set up the bundler correctly (which is not trivial), it will do the job.