Blog

Notes from building and untangling software

ClojureScript and the web, so far.

Manage compilation errors in shadow-cljs

During a large Figwheel-to-shadow-cljs migration, outdated dependencies, JavaScript imports, type hints and deprecated functions can interrupt hot reload.

As a temporary migration aid, shadow-cljs can continue recompiling despite warnings:

{:builds
 {:app
  {:target :browser
   :devtools {:ignore-warnings true}}}}

The warnings remain visible in the terminal and the browser console. Once the migration is complete, remove the option: warning suppression is useful scaffolding, not a healthy permanent setting.

Let’s build a ClojureScript PWA

A practical route from an empty shadow-cljs project to an installable Progressive Web App using Reagent.

The short version

  • Bootstrap a browser project with shadow-cljs.
  • Add React and Reagent, then render a small working interface.
  • Create a web app manifest with appropriately sized icons and a maskable icon.
  • Add a service worker, a theme colour, and correctly sized viewport content.
  • Capture beforeinstallprompt if you want an explicit install button.
  • Verify the result with browser application and accessibility tooling.

The accompanying example remains available in the cljs-pwa repository.