esbuild-preserve-whitespace

JSON →
library 1.1.1 ·javascript
verified May 1, 2026

An esbuild plugin that preserves blank lines and whitespace during TypeScript transpilation. Version 1.1.1 requires esbuild ^0.19.0 and the legalComments: 'inline' option. It works by replacing blank lines with marker comments before esbuild processes files, then removing them after. Unlike esbuild's default behavior (which strips most whitespace), this plugin provides configurable preservation of formatting, useful for debugging, code review, or when output readability matters. The plugin is lightweight, typed (TypeScript), and maintained on GitHub. It has no runtime dependencies beyond esbuild.

total hits 24
actors 5 distinct systems
last hit 1d ago human
ByteDance
5
Amazonbot
3
MetaBot
3
GPTBot
2
Humans
8

top countries 🇺🇸 United States · 🇸🇬 Singapore · 🇨🇦 Canada · VN · 🇪🇸 Spain