Every time I try to build something for the browser it reminds me why I hate building things for the browser.
You have to either use vanilla js which is pointless, or you use frameworks etc, which invariably involves any number of black boxes wrapped within other black boxes in some form of "build" process. If you breathe on it too hard the whole thing falls apart.