Seriously, the poster is going to have to host their files somewhere eventually if they intend anyone else to ever see it. I can't believe they rewrote all their JS because they were forced to access over http:// instead of file://. This seems nonsensical.
A simple web-server only does that: serving a website.
With a proper webpack setup, you get imports/exports, (node) module bundling, live reloading which all massively improve your development speed.
However I wouldn't recommend anyone to build their own webpack config if you don't know exactly what you're doing. Just use parcel: https://parceljs.org/
It does many things an advanced Webpack project does, but without any config. I use Parcel as long as possible and then switch to lower-level Webpack when I need more control. Easier way to start a new project.
using npx (included with npm):
using the php CLI: You weren't hitting the limits of vanilla JS, you were hitting the limit of reading files directly from disk instead of through a web server.