[ClojureScript] Re: Dead Code Elimination not happening

2018-09-02 Thread Aleš Roubíček
Cljsjs packages mostly contains external bundles that are prepended to cljs output. It is not processed by GCC nor dead code eliminated. You have to consume JS libraries directly as :npm-modules, then it should work. But I'm afraid that scoped npm modules like `@material-ui` do not work in cljs

[ClojureScript] Re: Dead Code Elimination not happening

2018-09-02 Thread Phill Wolf
I don't know, but on https://material-ui.com/style/icons/ it says Imports - If your environment doesn't support tree-shaking, the *recommended* way to import the icons is the following: import AccessAlarmIcon from '@material-ui/icons/AccessAlarm';import ThreeDRotation f

[ClojureScript] Re: Dead Code Elimination not happening

2018-09-01 Thread Scott Klarenbach
I guess it's because the js library wasn't written to be closure compatible. Would I better better off installing Material UI as an npm module and then including those into clojurescript's build? Would this provide treeshaking? Of course I'd then have to reproduce the cljsjs integrations. On

Re: [ClojureScript] Re: Dead Code Elimination

2015-03-10 Thread Marc Fawzi
absolutely wild guess: the compiler builds a call graph and any function that is not part of the call graph is eliminated (def x {:a 1 :b 2}) does not return a function but x maybe used inside some function, so I'm assuming the compiler just leaves it there why would it be hard to see if x is o

[ClojureScript] Re: Dead Code Elimination

2015-03-10 Thread Mike Thompson
On Wednesday, March 11, 2015 at 11:19:28 AM UTC+11, Mike Thompson wrote: > This issue from David Nolen, caught my eye: > https://github.com/andrewmcveigh/cljs-time/issues/21 > > Feels like there is important information there, but I just don't know enough > to interpret what's said. Can anyone he