esno
TS-ESNode
Our great sponsors
esno | TS-ESNode | |
---|---|---|
10 | 2 | |
1,529 | 37 | |
2.0% | - | |
4.9 | 6.0 | |
about 2 months ago | 4 months ago | |
TypeScript | TypeScript | |
- | 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.
esno
-
Finally, a guide for Node.js and TypeScript and ESM that works
Love this project, used it quite a bit. However I always opt for using esno[1] instead, merely because of the name; having two tools share the same name throws me off.
-
The esm/cjs situation...
Next, I thought well nx is not gonna work for now, so let's keep looking for an alternative to ts-node. Oh look, there is this https://github.com/esbuild-kit/tsx. It natively understands path aliases, no need for any flags. Oh wait...it doesn't do any type checking like ts-node. WHAT? why would anyone execute typescript without type checks during development?.
-
Svelte is migrating from TypeScript to JSDoc
I’ve generally found tsx to be better/less hassle than ts-node
-
TypeScript tooling and ecosystem
For just running Typescript files you have (both for dev and prod) https://github.com/esbuild-kit/tsx with command is generally easier then using ts-node + some file watcher or compiling to js
-
Usage TypeScript?
Just use tsx: https://github.com/esbuild-kit/tsx
- What's the proper tools to use for node.js development?
-
PSA: Speed up your ts-node command with a simple --swc flag
I've been using tsx, which is like ts-node except it uses esbuild under the hood. It's been pretty great. Super speedy.
-
tsx: Node.js enhanced with esbuild to run TypeScript & ESM
And compared to esno?
-
Typescript or JS with Node.js ?
Typescript with TSX for development
-
Unable to run ‘.ts’ - ESM modules and CommonJS
Take a look at Typescript runners like ts-node or esno (https://github.com/antfu/esno)
TS-ESNode
-
Hello Yarn 2, Goodbye node_modules
CommonJS is a great module system if you're using JS for scripting Unix (which it excels at). Is there a good reason to use ESM though? I've been half-joking that it's the "extinguish" phase of Microsoft's EEE strategy for JS.
I know one legitimate reason is "tree shaking" (source-level LTO when bundling modules). Dumber, static import/export statements probably simplify that in some way. However ESM destroys the isomorphism between JS modules and the filesystem.
One change that ES modules introduced, I think, for no other reason than to be backwards incompatible, is changing the behavior of the default export (`export default foo` transpiles down to `module.exports.default = foo` instead of `module.exports = foo`).
Other "ohai guys this is the new normal now" kinds of changes are making the dynamic imports async-only (after not supporting them for a while) as well as changing the behavior of module resolution.
And the cherry on top is called TS-ESNode: https://github.com/K-FOSS/TS-ESNode because TypeScript modules and ESM are the same thing yet you need to somehow find this third-party shim which is required for them to work together at all. It's enabled by wrapping the interpreter, just like Yarn2's new dependency resolution.
- easy way to reduce RAM consumption when using ts-node
What are some alternatives?
esbuild-node-tsc - Build your Typescript Node.js projects using blazing fast esbuild
esbuild-runner - ⚡️ Super-fast on-the-fly transpilation of modern JS, TypeScript and JSX using esbuild
electron-svelte-typescript-esbuild-template - Starter kit to build cross-platform desktop apps with Electron, Svelte, TypeScript and Esbuild.
ts-node - TypeScript execution and REPL for node.js
esbuild-svelte - An esbuild plugin to compile Svelte components
volta - Volta: JS Toolchains as Code. ⚡
ThinkJS - Use full ES2015+ features to develop Node.js applications, Support TypeScript.
tsx - ⚡️ TypeScript Execute: Node.js enhanced to run TypeScript & ESM
svelte-typescript-esbuild-tailwind-template - Build Svelte single page applications with the best tools.
ts-node-dev - Compiles your TS app and restarts when files are modified.