To compile Nim to JS, run `nim js myfile.nim`, simple as that. To use modules from npm, use jsffi module ([https://nim-lang.org/docs/jsffi.html](https://nim-lang.org/docs/jsffi.html)) and Webpack with Nim loader ([https://github.com/bmollot/nim-loade)](https://github.com/bmollot/nim-loade\)).
I tried it, works really well.
