(defn
repl-plugin
[{:keys [build-id], :as opts}]
(fn
[[{:keys [msg-name], :as msg} & _]]
(when
(= :repl-eval msg-name)
(ensure-cljs-user)
(eval-javascript**
(:code msg)
opts
(fn
[res]
(socket/send!
{:figwheel-event "callback",
:callback-name (:callback-name msg),
:content res}))))))