This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-11-18
Channels
- # 100-days-of-code (2)
- # beginners (10)
- # boot (1)
- # calva (8)
- # cider (13)
- # cljdoc (7)
- # clojure (32)
- # clojure-uk (15)
- # clojurescript (9)
- # code-reviews (1)
- # cursive (8)
- # datomic (1)
- # emacs (1)
- # fulcro (9)
- # hoplon (4)
- # nrepl (1)
- # off-topic (30)
- # onyx (2)
- # re-frame (11)
- # reitit (3)
- # shadow-cljs (33)
- # tools-deps (3)
- # vim (5)
silly thing i cant seem to figure out. when i try to use clojure -A:build
with
deps.edn
=>
...
:aliases
{:build
{:main-opts ["-m" "cljs.main" "-co" "build.cljs.edn"]}
and
build.cljs.edn
=>
{:output-to "target/create-registration/handler.js"
:output-dir "target/create-registration"
:asset-path ""
:source-map false
:target :nodejs
:main "create-registration.handler"
:optimizations :simple
:parallel-build true}
for a clojurescript compilation, it automatically adds the browser-repl
preload. i tried setting :browser-repl false
to no avail. anyone have any ideas?@nolan I think this is because, since you are only specifying an init option, it is trying to set up a REPL environment in which to process init options, and since no -re
is specified, it goes with the default of "browser".
But, if you really just want to compile, I think you'd just need to add -c
to the end of your :main-opts


@mfikes thanks a million man. adding -c
worked like magic. strangely enough when i tried -re node
i got a pretty cryptic repl error
Perhaps a more accurate way to look at this is to ask the question: "What happens when I don't specify a main option?"
right. in this case (with -co
specified and nothing else) i was thinking cljs.main
wouldnt try to do anything more with a repl. but it makes sense that making that explicit with -c
is probably better anyway
Another way to look at this is you may not really even want the shipping node REPL involved at all -re node
pulls cljs.repl.node
into the mix, which could very well be nothing you want to have to do with, if, for example you are compiling to just run under node, or you are using figwheel.main
or somesuch.