raquo / laminar-full-stack-demo

Fully working client + server, dev + prod setup for Scala.js development, showcasing a bunch of Laminar & Scala.js patterns.
https://demo.laminar.dev
MIT License
50 stars 11 forks source link

JsRouter incremental compilation problem #3

Closed raquo closed 6 months ago

raquo commented 10 months ago

You might have noticed that sometimes when adding a new page, you get an incremental compilation error like "ThatNewPage does not exist" which does not go away until you sbt clean. This seems to be this bug In Scala 3. I made a small reproduction for it, so hopefully the fix is coming.

As a workaround, after you create a new Page, you need to save the pages.scala file BEFORE you use the page anywhere. Or, you can change JsRouter by removing the export of pages, and using Scala 2 patterns for that.