tsc-esm-fix
aleph.js
Our great sponsors
tsc-esm-fix | aleph.js | |
---|---|---|
2 | 13 | |
67 | 5,249 | |
- | 0.3% | |
7.8 | 6.6 | |
6 days ago | 9 months ago | |
TypeScript | TypeScript | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
tsc-esm-fix
-
TypeScript is now officially 10 years old
Probably because it compiles them to a pre-standard ES5-compatible implementation based on good ol' `Foo.prototype`. And since they've already handled them one way, they can't become spec-compliant without breaking backwards compatibility.
The other place where this shines through particularly egregiously is the support of ESM static import/export. Everybody's build tools been compiling that back down to CJS so hard that Node.js 16+ introduced intentional incompatibilities between CJS and ESM modes just to get people to finally switch to the standards-compliant module system. So you end up in a situation where the library is written in TypeScript with ESM syntax but the only available browser build is a CJS blob which completely defeats the main touted benefit of static imports/exports, namely dead code elimination...
So you decide what the hell, let's switch TSC to ESM and moduleResolution node16, and end up having to use something like https://github.com/antongolub/tsc-esm-fix because the only allowed fix for TSC doing the wrong thing is at the completely wrong level - https://www.typescriptlang.org/docs/handbook/esm-node.html - if you don't see what's wrong with that, you're one of today's lucky 10000...
- TS and ts-jest meet “type”: “module”
aleph.js
-
I don't get fresh. why can't I use react without commiting to a server side framework?
Check aleph if you want to use react with deno. But I'd suggest sticking with Node.js and Vite as you'll get less surprises.
-
Modern SPAs without bundlers, CDNs, or Node.js
Here's another thing: if you want to grow from this exact setup, use deno. It has support for import maps and don't require a bundler or a separate compilation step for typescript
https://deno.land/[email protected]/basics/import_maps
Maybe add aleph too (which is similar to nextjs)
https://alephjs.org/
Deno won't require nearly as much tooling as nodejs, but it still has tooling for the cases you need it.
- Deno 1.28: Featuring 1.3M New Modules
-
Fresh is a new full stack web framework for Deno
There’s also https://alephjs.org, never used but pops up when you search for "deno react" so I assume is similar to nextjs.
- Aleph.js – Fullstack Framework in Deno
-
Using Ultra, the new React web framework
Aleph.js is a full-stack framework in Deno, used as an alternative to Next.js. Aleph.js offers features like ES module imports, file-system routing, SSR & SSG, and HMR with a fast refresh.
- Aleph.js is a fullstack framework in Deno, inspired by Next.js
- The Fullstack Framework in Deno
What are some alternatives?
ts-jest - A Jest transformer with source map support that lets you use Jest to test projects written in TypeScript.
ultra - Zero-Legacy Deno/React Suspense SSR Framework
TypeScript - TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
fresh - The next-gen web framework.
react-pair - 🖇️ Util to help with the paired hook pattern
vitext - The Next.js like React framework for better User & Developer experience!
tsx - ⚡️ TypeScript Execute: Node.js enhanced to run TypeScript & ESM
inertia-laravel - The Laravel adapter for Inertia.js.
node-win32-api - win32 api
marky - A modular and extensible ESM and Deno Markdown parser.
rescript-compiler - The compiler for ReScript.
derby - MVC framework making it easy to write realtime, collaborative applications that run in both Node.js and browsers