Fork me on GitHub

@grav Currently nbb exposes goog.crypt : But we can certainly add that one too. Would you like to make an issue?


Woops, sorry for not responding back here @U04V15CAJ. Thing is, I'm trying to use the bidi library which I've "checked out" via, and what I get is this:

$ npx nbb script.cljs 
npx: installed 6 in 1.178s
(node:84759) ExperimentalWarning: The ESM module loader is experimental.
----- Error --------------------------------------
Message:  Unable to resolve classname: goog.Uri
Location: /home/grav/repo/jadak/examples/nbb-demo/nbb-deps/bidi/bidi.cljc:6:3

----- Context ------------------------------------
3: (ns bidi.bidi
4:   (:refer-clojure :exclude [uuid])
5:   (:require clojure.string)
6:   #?(:cljs (:import goog.Uri)))
      ^--- Unable to resolve classname: goog.Uri
8: (defn url-encode
9:   [string]
10:   (some-> string
11:           str

----- Stack trace --------------------------------
bidi.bidi - /home/grav/repo/jadak/examples/nbb-demo/nbb-deps/bidi/bidi.cljc:6:3 

Unable to resolve classname: goog.Uri


So I'm wondering if it's possible to have the whole goog.* library available, like with regular ClojureScript


@grav It seems you can use the google-closure-library from npm to get to the stuff which is not available directly in nbb:


But that doesn't make your code compatible. Having goog.Uri in nbb is reasonable, but I have to add those things by hand. Feel free to make an issue for this


var b64string = /* whatever */;
var buf = Buffer.from(b64string, 'base64'); // Ta-da