Some people may actually know that I'm spending insane amounts of time on really stupid things - so welcome to next episode of "I have time and I do not know what do with it...". Previously this repository was dedicated for compiling Node.js projects into binaries (incld. How to compile Node.js to binary release (with native modules)?). Don't mind me bro I have ADHD.
- I've started using
yarn@3
even if it's pain in my ass because nobody really supports it and most people usesyarn@1/2
which crashes onyarn.lock
, so yeah. But it's slowly rising popularity so we're on good road in my opinion. pnpm
also seem to rise popularity, especially withinPure ESM
packages.
Let's resume all of the build tools we know and have for Node.js (because front-end have literally millions of them and none working properly) - ncc
,
tsc/typescript
, esbuild
, webpack?
, swc
.
tsup
esbuild
swc
ncc
pkg
node
deno
bun
- Still
typescript
.
I'm an early-bidder kind of guy, and I would like to say on freshest version of Typescript in this repository. TypeScript code is compiled to ES2015
JavaScript code as defined in tsconfig.json
and this version is also used as stock by @vercel/ncc
.
- Usage of
@vercel/ncc
to compile transpiled JavaScript (bytsc
) into bundled JavaScript. - Usage of
@vercel/pkg
to compile JavaScript (transpiled bytsc
) into single executable file
$ yarn
$ yarn build:tsc # dist/tsc
$ yarn build:ncc # dist/ncc
$ yarn build:pkg # dist/pkg (depends on dist/tsc)
There was some mess with native packages but I think with flow of time I'll find a good way of including them into build.
Supported | Untested | Unsupported |
---|---|---|
bcrypt |
sqlite aws-sdk |
realm |