This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-10-19
Channels
- # aws (4)
- # aws-lambda (2)
- # beginners (67)
- # boot (38)
- # cider (32)
- # cljs-dev (12)
- # cljsrn (2)
- # clojars (2)
- # clojure (190)
- # clojure-chicago (1)
- # clojure-dusseldorf (2)
- # clojure-germany (1)
- # clojure-greece (3)
- # clojure-italy (5)
- # clojure-russia (6)
- # clojure-spec (47)
- # clojure-uk (10)
- # clojurescript (59)
- # cursive (9)
- # data-science (14)
- # datomic (24)
- # devops (16)
- # emacs (8)
- # fulcro (25)
- # graphql (30)
- # hoplon (123)
- # juxt (15)
- # lambdaisland (2)
- # leiningen (4)
- # luminus (6)
- # lumo (9)
- # off-topic (11)
- # om (7)
- # onyx (8)
- # re-frame (14)
- # reagent (5)
- # ring-swagger (5)
- # shadow-cljs (46)
- # spacemacs (41)
- # specter (8)
- # testing (8)
- # unrepl (31)
- # yada (18)
@mhuebert I just pushed [email protected]
which adds a new :devtools {:async-require true}
option. it will load files using window.fetch
in :dev
mode
with 2.0.26, after cache is hot, yarn run watch
with Maria’s 3 builds takes 1.62 seconds 🙂
I did some experiments with this a while ago, your build seems like it might work with it
can also do <script src="/js/compiled/shadow-trusted.js" type="text/javascript" defer></script>
then, note the defer
or async
toggling the devtools async-require doesn’t seem to make much of a difference in my normal setup, but maybe with the virtualbox setup
the simplicity of this is nice:
lein new re-view my-great-app;
cd my-great-app;
lein figwheel;
I think the closest shadow equivalent I can think of is:
lein new re-view my-great-app;
cd my-great-app;
yarn install;
yarn run shadow-cljs npm-deps;
yarn run shadow-cljs watch browser;
I put the first 2 yarn things into a deps
command, and the last into watch
, so
yarn run deps;
yarn run watch;
ok. calling npm install
or yarn install
directly is ok i think as the first step (to install shadow-cljs). but the npm-deps
part is important because the template shouldn’t have to keep all its transitive deps in package.json.