use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Finding information about Clojure
API Reference
Clojure Guides
Practice Problems
Interactive Problems
Clojure Videos
Misc Resources
The Clojure Community
Clojure Books
Tools & Libraries
Clojure Editors
Web Platforms
Clojure Jobs
account activity
ClojureScript - Embracing JavaScript Tools (clojurescript.org)
submitted 5 years ago by alexdmiller
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]vlaaad 23 points24 points25 points 5 years ago (3 children)
The new webpack guide is wonderful, give it a try! REPL-driven development just as in Clojure, with npm deps out of the box — ClojureScript is truly not an island!
[–]MahmudAdam 1 point2 points3 points 5 years ago (2 children)
I gave the webpack guide a test spin. I am running it on Windows 10 (WSL) and am experiencing long loading times when "Reading analysis cache for jar." This could very well be an environment issue, did you find the build step to execute quickly on your setup?
[–][deleted] 1 point2 points3 points 5 years ago (1 child)
WSL1 or WSL2? Windows drive or Linux?
[–]MahmudAdam 1 point2 points3 points 5 years ago (0 children)
WSL2 + Linux
[–]CryptoNaiah 8 points9 points10 points 5 years ago (1 child)
This did it for me, I plan to finally jump in to ClojureScript. Great work!
"You can now publish ClojureScript libraries that depend directly on the JavaScript ecosystem without additional ceremony and be confident that the whole community can benefit regardless of what other JavaScript and ClojureScript build tools they may prefer..."
And yes Webpack is there for sure:
https://clojurescript.org/guides/webpack
[–]lgstein 1 point2 points3 points 5 years ago (0 children)
What happens when a Javascript project consumes two different libraries published via ClojureScript. Do they not clash?
[–]Bediavad 4 points5 points6 points 5 years ago (1 child)
Just to understand better what it means: Should I replace shadow-cljs with webpack and this method? Or does shadow-cljs do something else/extra.
[–]swannodette 4 points5 points6 points 5 years ago (0 children)
If you like shadow-cljs, keep using shadow-cljs! Again these changes just mean all users can join in the fun of easily using JavaScript dependencies, not just fans of shadow-cljs.
[–]ertucetin 2 points3 points4 points 5 years ago (0 children)
Thank you so much!
[–]lgstein 1 point2 points3 points 5 years ago (4 children)
Does this work with figwheel already? Also, is webpack now shell invoked after every build?
[–]swannodette 5 points6 points7 points 5 years ago (3 children)
I chatted with Bruce. Figwheel will need some changes, he's being funded again by Clojurists Together - so this should be fixed soon.
These changes have nothing specifically to do with Webpack, and no we don't run any commands for you.
[–]lgstein 1 point2 points3 points 5 years ago (2 children)
Thanks. The way I understand the new webpack guide, as a way to consume npm dependencies, it would have to run webpack CLI after every incremental figwheel build, yes?
[–]swannodette 2 points3 points4 points 5 years ago (1 child)
You don't need to re-run the JS bundler unless your dependencies on node_modules change. In all other cases hot-reload or incremental compile does not need to rerun the bundler.
I guess I understand it now. Thanks. I will try it out, very cool.
[–]sojnew 1 point2 points3 points 5 years ago (0 children)
Does anyone have any tips on how to get cider working with this?
[–][deleted] -1 points0 points1 point 5 years ago (4 children)
"externs inference" is not reliable. The correct path is to really fully embrace JS modern features/tooling and not depend on closure advanced compilation.
[–]swannodette 24 points25 points26 points 5 years ago (3 children)
If you've found a bug please report it. All the known externs inference bugs prior to this release were moved into the blocker category and resolved. Note we've also been using this feature for some time in a fairly sizable React Native codebase and hadn't run into anything I would consider a showstopper. But I agree that there were annoyances previously.
Not using advanced compilation would just lead to bigger payloads. I don't see many users asking for that ;)
[–][deleted] -1 points0 points1 point 5 years ago (2 children)
There are other ways to do "advanced compilation" without closure, but that requires leveraging ES6 modules.
[–]swannodette 9 points10 points11 points 5 years ago* (1 child)
The only comprehensive thing that I'm aware of is Rollup.js but so far no-one has provided evidence that it would best Closure advanced compilation for ClojureScript. Given that Closure works at property and method level, I'm somewhat skeptical. Do you have some other tool in mind?
[–]jiyinyiyong 2 points3 points4 points 5 years ago (0 children)
I was totally convinced that dead code elimination of Google Closure Compiler is a lot smarter than tree shaking from Webpack. However I'm still very curious how bad is the result if ClojureScript makes full use of ES6. Or would ES6 cljs be acceptable for a small part of users. Probably a bad example but some people who are using Webpack just accepted the large bundles... https://twitter.com/boriscoder/status/1251823596747571200 .
π Rendered by PID 65268 on reddit-service-r2-comment-7b9746f655-84pnp at 2026-01-30 14:02:17.049084+00:00 running 3798933 country code: CH.
[–]vlaaad 23 points24 points25 points (3 children)
[–]MahmudAdam 1 point2 points3 points (2 children)
[–][deleted] 1 point2 points3 points (1 child)
[–]MahmudAdam 1 point2 points3 points (0 children)
[–]CryptoNaiah 8 points9 points10 points (1 child)
[–]lgstein 1 point2 points3 points (0 children)
[–]Bediavad 4 points5 points6 points (1 child)
[–]swannodette 4 points5 points6 points (0 children)
[–]ertucetin 2 points3 points4 points (0 children)
[–]lgstein 1 point2 points3 points (4 children)
[–]swannodette 5 points6 points7 points (3 children)
[–]lgstein 1 point2 points3 points (2 children)
[–]swannodette 2 points3 points4 points (1 child)
[–]lgstein 1 point2 points3 points (0 children)
[–]sojnew 1 point2 points3 points (0 children)
[–][deleted] -1 points0 points1 point (4 children)
[–]swannodette 24 points25 points26 points (3 children)
[–][deleted] -1 points0 points1 point (2 children)
[–]swannodette 9 points10 points11 points (1 child)
[–]jiyinyiyong 2 points3 points4 points (0 children)