CB
Christian Battaglia
Developer · Builder · Creator
HomeBlogMusicProdEngProjectsUsesAboutQuotes

Front & Back ESM

Exploring the dream of writing frontend and backend code in one fell swoop with native ESM — Vite for the browser, native Node.js for the server, and the three pieces needed to make it work.
Christian Battaglia

Christian Battaglia

August 1, 2020

1 min read

ESM
Vite
Node.js
TypeScript
SSR
frontend
backend
isomorphic

Vite is great for frontend JavaScript as ESM modules. But what about native Node.js typescript code? I want to be able to write for the backend and the frontend in one fell swoop. Similar to how SSR works for Vite but not quite.

What I'm really looking for is 3 parts:

  • frontend ESM bundler
  • backend ESM (browser sim) SSR
  • backend ESM Node.js environment api

This would be the ideal.