Show HN: Nub – A Bun-like all-in-one toolkit for Node.js

github.com

23 points by colinmcd an hour ago


colinmcd - an hour ago

Colin here, creator of Nub. I’ve had the general shape of this in mind for years. Nub runs your code with stock `node`, augmented with a `--require` preload hook[0] that adds a transpiler (oxc-powered, packaged as a Node-API add-on), registers a module resolution hook[1], and injects polyfills as needed for APIs like `Worker`, `Temporal`, etc. All purely additive, your code ultimately runs using Node’s actual engine & stdlib implementations.

[0] https://nodejs.org/api/cli.html#-require-module

[1] https://nodejs.org/api/module.html#moduleregisterhooksoption...

bookernath - 12 minutes ago

Nice, I think this fills a niche. Does it work on cloudflare workers?

ssalbdivad - 23 minutes ago

Just merged a PR migrating our entire monorepo to nub.

0 issues, ridiculously fast.

GL26 - 7 minutes ago

nice ! does this work on docker containers ?