Closed javierfvargas closed 7 years ago
Apparently this should work as advertised:
UIBuild.scala
:
override def afterStarted(addr: InetSocketAddress): Unit = {
process = Option(
Process("npm run build -- --watch", base / "ui").run
)
}
Problem might be related to Play server not refreshing the asset after it's rebuilt by ng2
's watcher process. I'll investigate.
Confirmed, Play is not reloading when unmanaged resource is changed. I'll see what I can do about this. For now I advise running angular 2 via ng serve when possible.
Ok, fixed to some extent (--aot
can't be used with ng build -w
yet: https://github.com/angular/angular-cli/issues/5137). This will be included in today's update, but it comes with several changes and update to angular cli and angular itself, sorry.
Documentation states "Changes in ui folder don't cause Play reloads, but are observed (and handled) by Angular-CLI when Play is running in dev mode", however if I change something at ui I have to touch e.g. application.conf to get the change visible in my app.
Am I doing something wrong? How is your experience with this?