Fork me on GitHub
#shadow-cljs
<
2018-07-13
>
thheller13:07:45

@tomi.hukkalainen_slac I'm curious. Did you try shadow-cljs yet? I see that you are struggling to get CLJS+npm working I can tell you with confidence that this would all just work in shadow-cljs. 😉

Hukka13:07:24

Oh yes, I didn't ask here yet. I quickly checked the examples and noticed that they were all frontend only

Hukka13:07:49

I was wondering if there's a sample project that combines backend too, preferably with lein

thheller13:07:07

just use lein for the backend. no need to change that

Hukka13:07:14

The docs seemed to give pretty strong encouragement to not use lein, but I'm guessing shadow can't handle plain clj on its own

thheller13:07:59

you can use lein or tools.deps. I just recommend standalone shadow-cljs since its more tuned and takes care of some other stuff

thheller13:07:17

I'd guess that about half of the people here use lein though. https://shadow-cljs.github.io/docs/UsersGuide.html#Leiningen

Hukka13:07:46

How does shadow handle dead code elimination with the closure compiler and es modules?

Hukka13:07:06

I'm trying to get to the bottom of where the problem even is, currently

thheller13:07:48

node_modules never use the full DCE and only run through :simple (in shadow-cljs)

thheller13:07:06

but if you require only the "components" you need thats usually good enough

thheller13:07:11

and thats what the JS world does and recommends

thheller13:07:31

getting :advanced working for node_modules is highly experimental and has never worked reliably for me

Hukka13:07:22

sigh There are too many moving pieces

thheller13:07:03

yeah its highly experimental and alpha. I don't think that anyone has ever gotten that to work. at least I never heard a single success story

thheller13:07:24

it does work in a few isolated cases like just React+ReactDOM

thheller13:07:37

but each package you add makes success less likely