Fork me on GitHub
#shadow-cljs
<
2023-02-20
>
hifumi12308:02:21

When requiring a single JS file in CLJS code, does the JS file get passed through GCC’s advanced optimizations or simple optimizations? (Assuming I run shadow-cljs release app)

thheller08:02:52

define "single JS file"? it matters what it actually is, as in ESM, commonjs or closure js. and it matters how you include it.

hifumi12308:02:41

In src/foo.js

const bar = 1;
export { bar };
In src/uses_foo.cljs
(ns uses-foo
  (:require ["./foo" :as foo]))

foo/bar

thheller08:02:05

yes, that will go through advanced

hifumi12308:02:12

Sweet. Thanks!

Derek14:02:35

shadow-cljs 2.21.0 made it to Clojars but not to npm

thheller15:02:45

oops. fixed. thanks.

Derek15:02:00

thank you