                  (vals)
                  (remove :from-jar)
                  (map :provides)
-                 (reduce set/union #{'cljs.core})))
+                 (reduce set/union #{})))
 
+        ;; FIXME: not sure it should always compiled console helper?
         entries
-        (conj entries 'shadow.cljs.devtools.client.console)]
+        (conj entries 'cljs.core 'shadow.cljs.devtools.client.console)]
 
     (-> state
         (assoc :source-map-comment false)

             (into #{}))]

    (str "var CLJS_ENV = require(\"./cljs_env\");\n"
         (->> requires
              (remove #{'goog})
              (map (fn [sym]

         "\n")))

(defn src-suffix [state {:keys [provides] :as src}]
  ;; export the shortest name always, some goog files have multiple provides
  (let [export
        (->> provides
             (map str)
             (sort)
             (map cljs-comp/munge)
             (first))]
    (str "\nmodule.exports = " export ";\n")))

(defn cljs-env
  [state {:keys [runtime] :or {runtime :node} :as config}]
  (str "var CLJS_ENV = {};\n"
       "var CLJS_GLOBAL = process.browser ? window : global;\n"
       ;; closure accesses these defines via goog.global.CLOSURE_DEFINES
       "CLJS_GLOBAL.CLOSURE_DEFINES = " (output/closure-defines-json state) ";\n"
       "CLJS_GLOBAL.CLOSURE_NO_DEPS = true;\n"
       "var goog = CLJS_ENV.goog = {};\n"
       @(get-in state [:sources "goog/base.js" :input])
       ;; override goog.global = this;
       "goog.global = CLJS_GLOBAL;\n"
       "goog.provide = function(name) { return goog.exportPath_(name, undefined, CLJS_ENV); };\n"
       "goog.require = function(name) { return true; };\n"
       "module.exports = CLJS_ENV;\n"
       ))

(defn flush
  [state mode
