Hacker News new | ask | show | jobs
by rezokun 768 days ago
Ah, no bundlers, no minification, no types, a dream! So, real product example pls? And how you templating your html? Not JSX, obviously, so, string literals?
2 comments

Personally, I'm doing no bundlers (of my own code) and no minification in my development loop, but still using types with tsc --watch. Typescript is faster the closer it gets to just "type stripping" (where the target and module formats are both something like `es${currentYear - 2}`, especially in the default emit pattern where the JS files just get output side-by-side the TS files they input). TSX to JS transformation, with Typescript (as the only tool in that chain [0]), isn't much extra work to slow it down. (TSX is a pretty easy transformation from its syntax to simple function calls. The hard part of TSX is getting types right.)

[0] So no Babel, only Typescript. You probably don't need Babel in 2024.

(ETA: I've even documented this development pattern for a library I built: https://worldmaker.net/butterfloat/#/getting-started)

I was also reminded that I blogged about all of this back in March, too: https://blog.worldmaker.net/2024/03/13/node-packaging/
Web components.
So, mix of HTML, inline html strings and bunch of .querySelector() with DOM manipulation? I see.