This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-07-10
Channels
- # announcements (3)
- # architecture (54)
- # babashka (11)
- # beginners (12)
- # calva (5)
- # clj-on-windows (1)
- # cljdoc (2)
- # cljs-dev (1)
- # cljsrn (6)
- # clojure (130)
- # clojure-europe (8)
- # clojurescript (21)
- # conjure (23)
- # core-async (4)
- # datomic (7)
- # depstar (77)
- # events (1)
- # fulcro (27)
- # lsp (88)
- # malli (5)
- # meander (1)
- # off-topic (4)
- # pathom (43)
- # polylith (39)
- # re-frame (9)
- # shadow-cljs (14)
- # timbre (3)
- # tools-deps (53)
Does shadow-cljs have a way to check for unused dependencies in package.json for a clojurescript project like npm/yarn https://github.com/depcheck/depcheck does for JS projects? Or is there some combination of tooling that could accomplish that?
@lilactown the new build reports show it on mouseover. see https://code.thheller.com/demos/build-report/ui-report.html
@rberger not built in but I guess you can do npx shadow-cljs compile app --config-merge '{:js-options {:js-provider :external :external-index "foo.js"}}'
and then let the regular depcheck
run over that foo.js
file
that file will require all npm deps you'd otherwise include in a format depcheck should understand
another q: what's the way to tell shadow-cljs pull in the profiling version of React when doing a release build? https://gist.github.com/bvaughn/25e6233aeb1b4f0cdb8d8366e54a3977
:js-options {:resolve {"react-dom" {:target :npm :require "react-dom/profiling"}}}
, optionally wrapped in :release {:js-options ...}
when it should only apply to release builds?
could I elide the :release {,,,}
wrapping if I'm doing shadow-cljs release --config-merge ",,,"
?