ES Module imports in Node.js and the browser

4 · Eli Bendersky · Oct. 24, 2023, 4:32 a.m.
For a recent project, I wanted to have some JS code (in multiple files) available for testing from the command-line with Node.js, but also to be able to load the same code into a web page to be invoked directly from a browser. I've encountered this same issue before …...