Alternatively, you can use a simple web-server without needing all of webpack:
using npx (included with npm):
npx serve .
using the php CLI: php -S localhost:5000 -t .
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.