play-scala-react-seed
play-scala-react-seed copied to clipboard
Question: about watchSources
Hi in your build.sbt there is this line
watchSources ++= (baseDirectory.value / "public/ui" ** "*").get
May I know what does it do ?? There isn't a folder at public/ui
Best,
@AlexTo, public/ui is created when you run the build task. Frontend build artifacts will target is set to that dir. This line of code is adding the UI build to play project watch sources.
Sorry, after running "dist" in sbt shell, it compiles the "ui" folder where I put my react code into the "public" folder. However I don't think I recreate another "ui" folder under "public" folder, have a look at the screenshot. I think it just put the build of the react code directly under "public" folder, or am I missing something here??

In build.sbt it should say "ui/public" not public/ui or it might fail to get assets. watchSources ++= (baseDirectory.value / "ui/public" ** "*").get