简体   繁体   English

使用任何/ public修改重新加载Play Framework

[英]Play Framework reloads with any /public modification

I have a web site that runs in a subproject via sbt web/run , but it recompiles the entire site and reloads the play framework any time I modify a .js file in the /public folder. 我有一个通过sbt web/run在子项目中运行的sbt web/run ,但是每当我修改/public文件夹中的.js文件时,它都会重新编译整个网站并重新加载播放框架。 Is there any way to turn that off? 有什么办法可以关闭它吗? I'm running Play 2.4.6. 我正在运行Play 2.4.6。

lazy val web = project.in(file("web")).
  enablePlugins(PlayScala).
  settings(libraryDependencies ++= Seq(
    specs2 % Test,
    cache,
    ws
  ),
  routesGenerator := InjectedRoutesGenerator,
  fork in run := true
)

There's an old issue, but I thought it was fixed in 2.3: https://github.com/playframework/playframework/issues/2905 有一个老问题,但我认为它已在2.3中修复: https : //github.com/playframework/playframework/issues/2905

Looks like I had scalariform enabled in the top-level scope. 好像我在顶级范围内启用了标量。 This was causing .scala files to be reformatted and then recompiled, but only when other files were modified. 这导致重新格式化.scala文件,然后重新编译,但仅当其他文件被修改时。 Removing scalariform fixed it. 去除标尺将其固定。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM