You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<p>The Closure Compiler supports removing unwanted code by name. This allows removing code that normal dead-code removal can’t or won’t remove. This is quite dangerous as it can remove code you actually care about but it can remove a lot of dev only code easily. It is grouped into 4 separate options of which pretty much only <code>:strip-type-prefixes</code> is relevant to ClojureScript but other may be useful as well.</p>
6700
-
</div>
6701
-
<divclass="listingblock">
6702
-
<divclass="title">Example removing all uses of <code>cljs.pprint</code></div>
<p>Each of these options is specified as a Set of Strings. Please note that all the names specified here are JS names so certain CLJS names must be munged. <code>my-lib.core</code> becomes <code>my_lib.core</code>.</p>
<p>Removes everything starting with any of the given Prefixes. Allows removing entire CLJS namespaces.</p>
6725
-
</dd>
6726
-
<dt><code>:strip-name-prefixes</code></dt>
6727
-
<dd>
6728
-
<p>Allows removing properties by prefix. <code>#{"log"}</code> removes <code>this.logX</code> or <code>(defn log-me […​])</code></p>
6729
-
</dd>
6730
-
<dt><code>:strip-name-suffixes</code></dt>
6731
-
<dd>
6732
-
<p>Allows removing properties by suffix. <code>#{"log"}</code> removes <code>this.myLog</code> or <code>(defn my-log […​])</code></p>
6733
-
</dd>
6734
-
</dl>
6735
-
</div>
6736
-
<divclass="sidebarblock">
6737
-
<divclass="content">
6738
-
<divclass="paragraph">
6739
-
<p><strong>DANGER: Be careful with these options. They apply to your entire build and may remove code you actually need. You may accidentally remove code in libraries not written by you. Always consider other options before using this.</strong></p>
<p><code>shadow-cljs</code> can generate a detailed report for your <code>release</code> builds which includes a detailed breakdown of the included sources and how much they each contributed to the overall size.</p>
0 commit comments