Fork me on GitHub
#polylith
<
2022-12-16
>
RJ Sheperd01:12:03

Hey Folks - Is there a good example of a Polylith project with Clojure + ClojureScript alongside one another? Trying to figure out where compilation configuration should live for things like Figwheel for development vs. production.

Hukka08:12:47

We don't have an example, nor do we use figwheel. But our case is so simple it doesn't really need more than the one sentence description: shadow-clj frontend is in its own folder next to bases, components and projects, and babashka tasks which test, build and combine everything into one uberjar.

RJ Sheperd21:12:01

Got it. Is it possible to have a polylith where components are shared across clj/cljs (basically writing components as cljc)?

tengstrand06:12:17

If the component doesn’t depend on clj code, it should be possible to include it from the frontend code I think (that has been the idea at least) but haven’t tried it myself.

Hukka08:12:40

In the end polylith doesn't do anything you don't ask it to do. It checks that the structure is what it should be, helps you keep track of dependencies, test new things etc. But everything that is possible without using polylith is possible even when using it. It's a matter of configuring the other tools you would like to use.

Hukka08:12:08

We are frankly pretty light users of polylith the tool. Weeks go by without us ever calling it, since our builds and tests are outside it. For us the architecture, way of structuring the namespaces and files, is the major thing.