Fork me on GitHub

hi, anyone tried using amazon-cognito-identity-js directly, without aws-amplify? having a weird issue here: i have a namespace where i require cognito like this:

(ns xt.auth
    ["amazon-cognito-identity-js" :refer [CognitoUserPool]]))
And then i use it like this:
(defn user-pool [config]
  (CognitoUserPool. #js {:UserPoolId (:pool-id config) :ClientId (:client-id config)}))
Everything works when i load that namespace in REPL. Once i load it in browser (as dependency of another namespace), i’m getting error saying that CognitoUserPool is not a constructor. And it stops working in REPL too. (same error, not a constructor) Sometimes (not sure what’s the pattern yet), if i then reload the namespace in REPL, it starts working again, but once i refresh the browser, it stops working.


in a multi-module project, how are people setting versions of the internal project dependencies for shadow ? i.e. we build each module to a jar, install it locally and then use the dependency - with lein, the version is specified by slurping from a file in project.clj, but i can't do that in shadow


is a :configure hook a sane way to go ? or, i'm already using gulp to coordinate the result of the webapp build... i could also just modify the shadow-cljs.edn file from gulp - unless there's something obvious i'm missing ?