File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -1582,7 +1582,7 @@ should contain the source for the given namespace name."
1582
1582
1583
1583
(defn ^String src-file->goog-require
1584
1584
([src] (src-file->goog-require src {:wrap true }))
1585
- ([src {:keys [wrap all-provides :as options] }]
1585
+ ([src {:keys [wrap all-provides] :as options}]
1586
1586
(let [goog-ns
1587
1587
(case (util/ext src)
1588
1588
" cljs" (comp/munge (:ns (ana/parse-ns src)))
@@ -1592,7 +1592,9 @@ should contain the source for the given namespace name."
1592
1592
(IllegalArgumentException.
1593
1593
(str " Can't create goog.require expression for " src))))]
1594
1594
(if (and (not all-provides) wrap)
1595
- (str " goog.require(\" " goog-ns " \" );" )
1595
+ (if (:reload options)
1596
+ (str " goog.require(\" " goog-ns " \" , true);" )
1597
+ (str " goog.require(\" " goog-ns " \" );" ))
1596
1598
(if (vector? goog-ns)
1597
1599
goog-ns
1598
1600
(str goog-ns))))))
Original file line number Diff line number Diff line change 497
497
; ; but a bit annoying here
498
498
(ana/analyze-file src opts)
499
499
(-evaluate repl-env f 1 (cljsc/add-dep-string opts compiled))
500
- (-evaluate repl-env f 1 (cljsc/src-file->goog-require src)))
500
+ (-evaluate repl-env f 1
501
+ (cljsc/src-file->goog-require src {:wrap true :reload true })))
501
502
(binding [ana/*cljs-ns* ana/*cljs-ns*]
502
503
(let [res (if (= File/separatorChar (first f)) f (io/resource f))]
503
504
(assert res (str " Can't find " f " in classpath" ))
You can’t perform that action at this time.
0 commit comments