1

While building the web app for a new firebase deploy, I have been using:

$ shadow-cljs compile app

Actually, even clearing stuff and then re-compiling, such as:

$ rm -rf .shadow-cljs
$ shadow-cljs compile app

Apparently, the release command could also be used:

$ shadow-cljs release app

What is the difference between the two? What are the implications of each choice? On a build before a new deployment, what would be the best practice?

Thanks

Pedro Delfino
  • 2,421
  • 1
  • 15
  • 30

1 Answers1

1

The compile command builds a development version and exits: https://shadow-cljs.github.io/docs/UsersGuide.html#_development_mode

The release command builds a release version and exits: https://shadow-cljs.github.io/docs/UsersGuide.html#_release_mode

Eugene Pakhomov
  • 9,309
  • 3
  • 27
  • 53
  • Is there any practical implication beyond the size/amount of files generated? – Pedro Delfino Aug 17 '22 at 17:36
  • 1
    Too many to list in a comment. In short, a dev build is optimized for, well, development, including hot code reloading. A release build is optimized for performance and size. – Eugene Pakhomov Aug 17 '22 at 18:02
  • 2
    Development builds should never leave the developers machine basically. So only `release` builds should be deployed or copied elsewhere. – Thomas Heller Aug 18 '22 at 06:52