Say I have two JavaScript programs, one runs in a browser, the other runs in Node.js. The code are all in src/ folder with two different entries: src/app/client.cljs and src/app/server.cljs.
Can I start a shadow-cljs server to compile both of them?
Currently I’m using two folders like client/src/app/ and client/src/server/ with two seperated shadow-cljs servers compiling them. I want to reduce the cost building programs meanwhile share code between two of them.
One more question, does watching server differentiate two programs seperately? Like after editing client.cljs, will the server part be notified of reloading?
No. One watch does not affect the other. The only thing that matters is what is used in a build. So if you edit app/client.cljs the server won’t be affected. When you edit app/shared.cljs it will be when the server actually uses it.