This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-07-13
Channels
- # aleph (15)
- # announcements (4)
- # babashka (36)
- # babashka-sci-dev (1)
- # beginners (15)
- # biff (2)
- # calva (15)
- # cider (3)
- # clj-kondo (8)
- # clojure (149)
- # clojure-europe (14)
- # clojure-norway (13)
- # clojure-switzerland (1)
- # clojure-uk (1)
- # clojurescript (21)
- # community-development (5)
- # cursive (20)
- # data-science (2)
- # datomic (7)
- # duct (5)
- # emacs (19)
- # etaoin (3)
- # events (2)
- # fulcro (11)
- # introduce-yourself (2)
- # jobs (4)
- # jobs-discuss (19)
- # joyride (1)
- # leiningen (11)
- # malli (7)
- # membrane (131)
- # nbb (12)
- # nginx (1)
- # off-topic (33)
- # pathom (8)
- # polylith (28)
- # re-frame (8)
- # sci (7)
- # shadow-cljs (225)
- # spacemacs (10)
- # specter (1)
- # vim (10)
- # xtdb (8)
Just released another version of nbb with some bug fixes. Nbb's birthday is coming up at the end of the month - will it reach 500 stars or not by then...? https://github.com/babashka/nbb
Let's say, I want to run serverless function (DigitalOcean functions) accepting only CommonJS with a main
function.
For now, I have a working solution with this wrapper hello.cjs
:
async function main(params) {
const { handler } = await import('./hello.mjs');
return handler(params);
}
exports.main = main;
Any kind of suggestion or better way to run nbb?Yes, exactly.
One other option is to put it through webpack which is able to bundle your entire thing into a .cjs file, including nbb.
But I think your workaround is great and should maybe be documented somewhere in nbb's repo
Thanks. 🙂 I saw this happen when you added the version of nbb with bundle. Will try.
Yes, that's what I intended (to document this). Precisely, I wanted a confirmation before doing the PR so perfect 🙂
> what did you see happen? Badly expressed sorry. I saw the doc about bundle + webpack that you linked.