Why not webpack?

Since the fresh new official Guide sparked some new interest in using webpack with ClojureScript I thought I’d write up my experience in trying to combine webpack+CLJS and why shadow-cljs ultimately went a different path.

https://code.thheller.com/blog/shadow-cljs/2018/06/15/why-not-webpack.html

14 Likes

Although I am not using shadow-cljs yet, but after several attempts I have similar conclusion. Thanks for bringing this on the table for discussion!

1 Like

Left us hanging a bit on the “How it works in shadow-cljs now” with the lack of examples—which were great up until that point :slight_smile:

Can you show the previous foo.js and bar.js examples and how shadow-cljs processes them today? And maybe clarify how this method solves the problems detailed in the post.

1 Like

I’ll see about adding that although I’m not sure how interesting the actual code is. It is functionally identical to webpack. Create a function wrapper, invoke it at some point, expose exports to others.

I really appreciate the “perfectionist” approach in addressing these problems, @thheller. Webpack is definitely the 80% solution, but getting the last 20% in terms of performance, developer experience, and all of the various use cases is a lot of time and effort. Thank you so much for contributing that to the community!

2 Likes

I expanded the “How it works in shadow-cljs now” section a bit. Hopefully the examples capture all the important details now.

2 Likes

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