Skip to content

Commit 2d59793

Browse files
anmonteiroswannodette
authored andcommitted
CLJS-2026: Add Compiler option for rewrite polyfills
1 parent 123643b commit 2d59793

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/main/clojure/cljs/closure.clj

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,10 @@
246246
(. compiler-options
247247
(setGenerateExports (:closure-generate-exports opts))))
248248

249+
(when (contains? opts :rewrite-polyfills)
250+
(. compiler-options
251+
(setRewritePolyfills (:rewrite-polyfills opts))))
252+
249253
(. compiler-options
250254
(setOutputCharset (to-charset (:closure-output-charset opts "UTF-8"))) ;; only works > 20160125 Closure Compiler
251255
)
@@ -1575,7 +1579,7 @@
15751579
(-> opts
15761580
(select-keys
15771581
[:closure-warnings :closure-extra-annotations :pretty-print
1578-
:language-in :language-out :closure-module-roots])
1582+
:language-in :language-out :closure-module-roots :rewrite-polyfills])
15791583
(set-options (CompilerOptions.))))
15801584

15811585
(defn get-js-root [closure-compiler]

0 commit comments

Comments
 (0)