Is npm not recommanded to use in cljs.main anymore?

clojurescript

#1

Recently I found the tutorial of how to use npm with cljsbuild has been removed. Is this not recommended anymore? and is there any replacement?

BTW, Also can’t find doc for Infer Externs.


#2

:npm-deps usage is just too experimental and advanced for most users. Webpack works nicely and that’s the recommended way now in most cases: http://clojurescript.org/guides/webpack

Hope this helps!


#3

So in this case, webpack is just used to package the dependencies?

Is it true in this way, we don’t need to write extern files?

Also, I wondering how css loader works with webpack and ClojureScript.


#4

Yes that’s right. The compiler setting :infer-externs true will handle automatic generation of the required externs.

As far as css loader etc., all that stuff just works because we don’t deal with any of that. Let webpack … webpack :wink:

HTH,
David


#5

sounds great, eager to have a try.