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

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.

: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 Likes

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.

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

sounds great, eager to have a try.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.