This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-07-08
Channels
- # aws-lambda (3)
- # beginners (27)
- # boot (4)
- # cljs-dev (26)
- # clojure (7)
- # clojure-spec (8)
- # clojure-uk (17)
- # clojurescript (1)
- # core-typed (2)
- # data-science (53)
- # datomic (24)
- # emacs (1)
- # fulcro (7)
- # luminus (1)
- # off-topic (2)
- # onyx (3)
- # pedestal (5)
- # planck (2)
- # portkey (50)
- # re-frame (15)
- # reagent (5)
- # reitit (2)
- # shadow-cljs (19)
- # tools-deps (15)
- # vim (2)
@urbanslug you can import using the default keyword (see shadow user manual) or just access the property named “default”
@lee.justin.m I swear I gleaned over this manual a couple of times and didn't see this
Hmm, trying to use the aws-sdk
package and it is bundling the node.js version:
(ns my-ns.aws
(:require ["aws-sdk/lib/util" :as util]))
(prn [(util/isNode) (util/isBrowser)])
;; => [true false]
in the aws-sdk package.json
there are some "browser"
settings which maybe aren’t being read?
"browser": {
"lib/aws.js": "./lib/browser.js",
"fs": false,
"./global.js": "./browser.js",
"./lib/node_loader.js": "./lib/browser_loader.js"
},
there is a also this field
"browserify": {
"transform": "./dist-tools/transform.js"
},
isBrowser: function isBrowser() { return process && process.browser; },
isNode: function isNode() { return !util.isBrowser(); },