When you create and use macros in a single “.cljc” file. You have to include macros as follows:

(ns my.ns #?(:cljs (:require-macros [my.ns :refer [macro-name]])))

(defmacros macro-name [] nil)
(macro-name)