This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-07-10
Channels
- # announcements (5)
- # aws (18)
- # babashka (1)
- # beginners (81)
- # calva (7)
- # chlorine-clover (1)
- # cider (5)
- # cljs-dev (8)
- # clojure (125)
- # clojure-dev (1)
- # clojure-europe (31)
- # clojure-italy (3)
- # clojure-nl (2)
- # clojure-norway (1)
- # clojure-spec (5)
- # clojure-sweden (1)
- # clojure-uk (31)
- # clojurescript (85)
- # code-reviews (1)
- # core-async (17)
- # cursive (39)
- # datomic (16)
- # emacs (1)
- # fulcro (6)
- # java (16)
- # kaocha (2)
- # luminus (4)
- # malli (2)
- # off-topic (65)
- # pathom (3)
- # re-frame (11)
- # reagent (5)
- # remote-jobs (1)
- # rum (5)
- # sci (10)
- # shadow-cljs (24)
- # spacemacs (4)
- # test-check (3)
- # tools-deps (22)
- # xtdb (15)
Is package.json
+ build.edn
(rather than :npm-deps
) now the best place for a cljs library (per https://clojurescript.org/guides/webpack) to note its js dependencies and a path to a working bundling method, which then assumes that downstream users will just need to be aware that they need to add those for themselves on their own?
so is it fair to say that the bundle target with aggressive js hinting may solve npm usage and advanced compilation for the final stages of projects, but cljsjs is still a needed step for libraries? i thought i’d finally escaped generating externs!
the webpack guide doesn’t really go into it, but if you assume that people are using the :bundle
target, then the idea is you place your libs npm deps in deps.cljs
to tell downstream apps/libs to install them.
then, use them throughout your lib code the same way it says in the webpack guide