Skip to content

A Zero-Build Web Stack: Native ES Modules, JSDoc Types and htmx Without a Bundler

InfoWorld describes a web setup that skips bundlers, compilers and npm installs, using native ES modules, JSDoc types, htmx and Vercel with Firestore. The author argues this covers most needs of a typical app.

3 min readBased on 1 source14 views

TL;DR

  • The article argues that browsers now handle modules, CDNs and HTTP/2 well enough to drop the usual bundler and build step.
  • Type checking can come from JSDoc comments read by the IDE, so plain JavaScript keeps most of the safety of TypeScript.
  • htmx moves state handling to the server by swapping HTML fragments, and a serverless function with Firestore can serve them.

Why the build step is being questioned

The author starts with the cost of a typical modern project. Running a scaffolding command can download hundreds of megabytes and thousands of dependencies, all to render a simple page. The piece argues that browsers, serverless hosting and cloud-native databases have matured enough that much of this tooling is no longer required for a typical app.

Native modules instead of a bundler

All modern browsers support ECMAScript (ES) modules, so the browser can load import and export directly. Bundlers exist to solve three problems: bare specifiers such as import React from 'react', network waterfalls where a file is downloaded only after its parent is parsed, and tree shaking, which removes unused code from libraries. The article says each of these now has a native answer. An import map in index.html tells the browser where to resolve package names. A CDN such as esm.sh compiles packages into ES modules and trims unused code before sending them. HTTP/2 fetches many small files in parallel, which reduces the waterfall effect. The result is an app that loads its own files and third-party packages without npm install or a package.json.

Type checking with JSDoc

The main argument for a build step is TypeScript. The article points out that modern editors run the TypeScript language server on plain .js files too. Developers can annotate their code with JSDoc comments such as @typedef and @returns, and the editor then gives the same autocompletion and error highlighting as in a .ts file. The code stays valid JavaScript that runs without a compiler. The author notes that the Svelte team moved its core codebase from .ts back to .js with this approach to remove build friction. Type checks in this setup depend on editor tooling, so they are guidance during development rather than a compile-time gate unless the team adds its own check.

Server-rendered fragments with htmx

Without a reactive framework, the article suggests letting the server hold the state. htmx adds attributes such as hx-get, hx-target and hx-swap to HTML, so a click can fetch a fragment and replace part of the page. The author argues this avoids the split-state problem of modern single-page apps, where data lives in the database, on the server and in a client store that must be kept in sync. Instead of JSON that the client parses and templates, the server returns HTML.

Firestore and Vercel as the backend

The example backend uses Firestore, a managed document store that the article says has been available since 2017, with Vercel serverless functions. The function reads a document with the Firebase Admin SDK, inserts the values into an HTML string and returns it with the text/html content type. The author says this removes the need for SQL migrations, connection pooling and dedicated database instances. The sample code inserts user values into HTML without escaping, so teams copying it would need to add their own sanitization.

Why it matters

For teams building small to mid-sized apps, the approach suggests fewer moving parts: no bundler configuration, no node_modules to maintain and a shorter path from edit to deploy. Front-end developers would rely more on HTML and the server for state, and less on client-side stores. Teams should weigh the trade-offs the article only partly covers, such as how well this holds for large codebases, complex client-side interactions and libraries that do not ship ES modules. Developers who want background on the server-driven approach can read about how HTML fragments are served over the wire, and should check any CDN-delivered dependencies for security and availability before relying on them in production.

Sources

This article was written by Blozhik from the reporting below. Read the originals for full detail.

InNo bundler, no builds, no bloat: Stripping web development down to the essentialsInfoWorld
Was this useful?

Keep reading

Discussion · 0

Sign in to join the discussion. Liking does not need an account.Sign inRegister
Loading comments…
blozhikDeveloper news from across the web, explained. Every story links to its original sources.