File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 29282928 (map str (keys top-level)))))))
29292929 opts))
29302930
2931- (defn output-bootstrap [{:keys [target] :as opts}]
2932- (when (and (#{:nodejs } target)
2933- (not= (:optimizations opts) :whitespace ))
2931+ (defn output-bootstrap [{:keys [target target-fn] :as opts}]
2932+ (when (or (and (#{:nodejs } target)
2933+ (not= (:optimizations opts) :whitespace ))
2934+ target-fn)
29342935 (let [target-str (name target)
29352936 outfile (io/file (util/output-directory opts)
29362937 " goog" " bootstrap" (str target-str " .js" ))]
2937- (util/mkdirs outfile)
2938- (spit outfile (slurp (io/resource (str " cljs/bootstrap_" target-str " .js" )))))))
2938+ ; ; not all targets using :target-fn might provide a bootstrap file to include
2939+ (when-let [bootstrap-file (io/resource (str " cljs/bootstrap_" target-str " .js" ))]
2940+ (util/mkdirs outfile)
2941+ (spit outfile (slurp bootstrap-file))))))
29392942
29402943(defn compile-inputs
29412944 " Compile inputs and all of their transitive dependencies including JS modules,
You can’t perform that action at this time.
0 commit comments