Good that you managed to solve it JavaScript bundlers, transpilers, tooling, etc. are indeed really complicated and add quite a bit of cognitive overhead.
Just to add to what I said before, note that defining variables with let
or const
will not define them as globals on the window
object (as opposed to var
when used at the top level). In general, if you want a global that you can use from the console, defining it explicitly as window.myGlobal = ...
is usually the best way.