This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-08-05
Channels
- # all-the-channels (1)
- # announcements (3)
- # asami (13)
- # beginners (227)
- # calva (2)
- # chlorine-clover (8)
- # cider (7)
- # clj-kondo (4)
- # cljs-dev (21)
- # cljsrn (8)
- # clojure (64)
- # clojure-europe (39)
- # clojure-france (2)
- # clojure-italy (3)
- # clojure-losangeles (1)
- # clojure-nl (20)
- # clojure-uk (8)
- # clojurescript (24)
- # conjure (12)
- # datalog (9)
- # datomic (24)
- # emacs (8)
- # figwheel-main (1)
- # fulcro (15)
- # jobs-discuss (1)
- # malli (5)
- # meander (3)
- # off-topic (26)
- # re-frame (15)
- # reagent (10)
- # reitit (1)
- # reveal (1)
- # sci (15)
- # shadow-cljs (25)
- # spacemacs (7)
- # sql (3)
- # xtdb (1)
I’m trying to import IconContext
for react-icons
I’ve been able to import the actual icons ok, but I need to import IconContext
for changing the Icon’s attributes. I’ve tried:
["react-icons" :default IconContext]
["react-icons" :refer (IconContext)]
["react-icons" :as IconContext] # I know that one shouldn't work but tried anyway
And I always get:
[:app] Build failure:
package in /Users/rberger/omnyway/visx/visx-shopper-app/node_modules/react-iconsspecified entries but they were all missing
{:tag :shadow.build.npm/missing-entries, :entries ["lib"], :package-dir #object[java.io.File 0x627fddf1 "/Users/rberger/omnyway/visx/visx-shopper-app/node_modules/react-icons"]}
ExceptionInfo: package in /Users/rberger/omnyway/visx/visx-shopper-app/node_modules/react-iconsspecified entries but they were all missing
Any idea what I’m doing wrong? The Original react-icons doc for the import is at:
https://github.com/react-icons/react-icons#configuration@rberger hmm try "react-icons/lib/cjs/index.js"
for now. the package seems to be bundled rather strangely
Hi @thheller I observed the following behavior: deps.cljs file in src/ works (= dependencies are added to package.json). deps.cljs in src/pinkgorilla -> does not work (dependencies not added to package.json). I am not sure if this is intentionally or not.
deps.cljs must always be in the "root" of the classpath. it does not work anywhere else.
And there is not really any way to tell if the resource has been placed correctly or not.
not interested. pinkgorilla.deps
would be a completely ok namespace and checking every possible deps.cljs
file whether its an actual ns or not is not practical.
@thheller NPM deps that are already in package.json
get filtered out by https://github.com/thheller/shadow-cljs/blob/master/src/main/shadow/cljs/devtools/server/npm_deps.clj#L222
Or in other words, if all the deps that shadow-cljs is responsible for are already in package.json
shadow-cljs does not run any npm install
command at all ?
Does that mean that the intended behaviour is that its a user's responsibility to run npm install
prior to shadow-cljs manually or via another build tool ?
@superstructor the intention is that users manage their own packages yes. shadow-cljs is not a package manager.
ok thanks @thheller :thumbsup:
Hello, how to make js/URL
to be resolved to custom class (like URL from react-native-url-polyfill) ? Or in general, how to change global var like js/window
or js/document
?
I’m trying to use this in config
:js-options {:resolve {"react-native-url-polyfill" {:target :global
:global "URL"}}}
nothing can affect what js/URL
resolves to. it literally means use the global URL
object, whatever that may be.
There is other code relying on URL to be globally available and I cannot change that code, but would like to provide my own URL implementation