I can't seem to use macros in clojurescript REPL.
I define macro in macros.clj:
(ns clojurescripting.macros)
(defmacro increment [x]
`(+ 1 ~x))
Then I use it in core.cljs
(ns ^:figwheel-hooks clojurescripting.core
(:require-macros [clojurescripting.macros]))
(defn main []
(js/alert (clojurescripting.macros/increment 0)))
(main)
The code actually uses increment macro, because it gives alert with correct output.
I run repl with clojure -A:fig:build.
When I try to use macros in REPL, I can't access the macro - there is no clojurescripting.core/increment, and I can't access clojurescripting.macros there.
Another question: Is this possible in any REPL? It seems possible in general, as book Learning Clojurescript provide almost identical example, and proceeds to evaluate it in the REPL.
PS
This is not a duplicate of this question - it is most likely outdated, and the accepted answer is cryptic (I'm not even sure what bREPL is, and whether figwheel uses it).