Hacker News new | ask | show | jobs
by _nalply 2368 days ago
Tonight I just got my own small dev server running without a bundler. It is simpler than Zwitterion because it has a narrower scope: only ES modules, an import map generator and a simple hot reload watcher (with Koajs and a websocket).

My hobby project uses web components with lit-html as frontend. I was frustrated with bundlers. They are probably neccessary in production, however I just wanted to have a smooth code-test loop! A few minutes with my newly created dev server and I soon figured out an old stupid little problem which was stumping me before just because I didn't have a quick code-test loop.

The lynchpin here is the import map. With the import map there's an alternative to bundlers. Instead of transpiling whole projects with all their dependencies, you just let fetch all modules. I know, this doesn't scale, but for quick experiments this is almost too simple to be true.