       (when (and sourcemap-json name)
         (swap! st assoc-in [:source-maps name] (transit-json->cljs sourcemap-json)))
       (when-not (skip-load-js? name)
-        (let [[pre post] (split-source js-source)]
-          (js/eval pre)
-          (js/PLANCK_EVAL post (file-url (add-suffix path ".js")))))
+        (js/PLANCK_EVAL (str "\n" js-source) (file-url (add-suffix path ".js"))))
       (merge {:lang   :js
               :source ""}
         (when cache-json

        (cljs->transit-json (get-in @planck.repl/st [:source-maps name]))))
    (if (and (not (empty? path))
          (not= "Expression" path))
      (let [[pre post] (split-source source)]
        (js/eval pre)
        (let [exception (js/PLANCK_EVAL post (file-url (js-path-for-name name)))]
          (when exception
            (throw exception))))
      (js/eval source))))

(defn- extension->lang

  [path]
  (str "file:///" path))

(defn- caching-js-eval
  [{:keys [path name source cache]}]
  (let [source (str (form-compiled-by-string (form-build-affecting-options)) "\n" source)]
