File tree Expand file tree Collapse file tree 4 files changed +11
-2
lines changed
Expand file tree Collapse file tree 4 files changed +11
-2
lines changed Original file line number Diff line number Diff line change 10981098 #?@(:clj
10991099 [(ana/foreign-dep? lib)
11001100 ; ; we only load foreign libraries under optimizations :none
1101- (when (= :none optimizations)
1101+ ; ; under :modules we also elide loads, as the module loader will
1102+ ; ; have handled it - David
1103+ (when (and (= :none optimizations)
1104+ (not (contains? options :modules )))
11021105 (if (= :nodejs target)
11031106 ; ; under node.js we load foreign libs globally
11041107 (let [ijs (get js-dependency-index (name lib))]
Original file line number Diff line number Diff line change 11(ns loader-test.foo
22 (:require [goog.dom :as gdom]
33 [goog.events :as events]
4- [cljs.loader :as loader])
4+ [cljs.loader :as loader]
5+ [my.foreign])
56 (:import [goog.events EventType]))
67
78(enable-console-print! )
Original file line number Diff line number Diff line change 1+ var foreign = function ( ) {
2+ console . log ( "I'm foreign!" )
3+ } ;
Original file line number Diff line number Diff line change 186186 {:output-dir output-dir
187187 :optimizations :none
188188 :verbose true
189+ :foreign-libs [{:file " loader_test/foreign.js"
190+ :provides [" my.foreign" ]}]
189191 :modules
190192 {:foo
191193 {:output-to (str (io/file output-dir " foo.js" ))
You can’t perform that action at this time.
0 commit comments