Re:Web Dev Without Tools
by charred_patina on Friday July 28, 2023 @12:39PM
(#36909527)
You can also use the http-server npm package, but there's an issue with non-ES6 module resolution. I have started using Vite since it's lightweight, but also provides me with nice to haves module resolution for different module types, and hot reloading.
I am not affiliated with Vite in any way, I just really like it for vanilla web dev.
I also used http-server but pressing f5 or including live.js gets old quickly. Vite is a breath of fresh air, for both vanilla formats and “apps” with scss, ts, etc. Finally someone made a no-bs dev watcher and packager.
The only thing to note for purists, it creates .vite folder which you have to ignore.
There are no conditional top level imports, but you can call import("thing") which gives you a promise for the module.