Dear vanilla JavaScript users, which version do you use? Transpiler?
Pacharapol Withayasakpunt
Posted on December 11, 2020
This aligns with not only Node version, but also which web browsers do you target.
Do you transpile JavaScript (or something else, like Kotlin) to JavaScript at all?
Also, on Node.js - commonjs or ESM? Commonjs style can be easily used as node index.js
or node .
, but is running ESM really that more complex, considering Deno is even worse?
node --experimental-modules server.js
# if you want to use Chrome inspector
node --experimental-modules --inspect server.js
# without precompiling with Babel
babel-node server.js
# ts-node that probably will always run
ts-node -O '{"module":"commonjs","noExplicitAny":false}' -r tsconfig-paths/register server.ts
deno --allow-net server.ts
I feel like TypeScript is waging war with JavaScript. If it ever add non-JavaScript compilation target, it would be Embrace, Extend, and Extinguish. So Microsoft-like. I feel like people are forced to choose either.
TypeScript is just a near-zero-config to-JavaScript compiler; with only single-install (and Babel is just the opposite of complexity). Not to mention that Babel is not the only JavaScript compiler.
Also, in VSCode, it is helpful to have jsconfig.json
, no matter which JavaScript do you choose.
Posted on December 11, 2020
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.