                         sources)))
         [sources' modules]
         (reduce
-          (fn [[sources ret] [name module-desc]]
-            (let [{:keys [entries output-to depends-on]} module-desc
-                  js-module (JSModule. (clojure.core/name name))
+          (fn [[sources ret] [name {:keys [entries output-to depends-on] :as module-desc}]]
+            (assert (or (= name :cljs-base) (not (empty? entries)))
+              (str "Module " name " does not define any :entries"))
+            (let [js-module (JSModule. (clojure.core/name name))
                   [sources' module-sources]
                   ;; compute inputs for a closure module
                   ;; as well as sources difference

     :output-dir "samples/hello/out"
     :modules
     {:hello
      {:output-to "samples/hello/out/hello.js"}}})
  )

(defn watch

                             (str ":source-map must name a file when using :whitespace, "
                                  ":simple, or :advanced optimizations"))
                           (doall (map #(source-on-disk all-opts %) js-sources)))
                         (if (:modules all-opts)
                           (->>
                             (apply optimize-modules all-opts js-sources)
                             (output-modules all-opts))
