I couldn't get (defn ^:dev/after-load ~'render ,,,) to survive macro expansion, but (defn ~'render {:dev/after-load true} ,,,) did 🙂
Very happy with this; wish I knew enough to explain exactly why the shorthand form was lost in macro expanison. Something to do with the metadata being applied in clj-land before jumping to cljs?
This isn't specific to cljs, as I understand your question. The reader takes the metadata and attaches it to the form that follows -- the whole unquote/quote form -- where you need it attached to the symbol render. Moving the metadata after the function name in a defn works because it'll be applied to the symbol/var. Another option is to use a let outside the macro body and with-meta to add it to the symbol, with a local binding that is then unquoted in the macro form.
Thank you Sean, very clear!