title: Play Framework with React in Webjar
body: <p>What I am looking for is a way to make the development with Play and React happens smoothly. I was hoping that if I use ReactJS in Webjar, there would be a way that I can use JSX transformer in development, and have the JSX compiled in production, i.e. when I run <code>activator dist</code> command. Is there a way to achieve such a development workflow?</p>
  
  <p>Here is my build.sbt</p>
  
  <pre><code>name := "play-scala"
  
  version := "1.0-SNAPSHOT"
  
  lazy val root = (project in file(".")).enablePlugins(PlayScala)
  
  scalaVersion := "2.11.6"
  
  libraryDependencies ++= Seq(
    "org.webjars" %% "webjars-play" % "2.3.0-2",
    "org.webjars.bower" % "react" % "0.13.1"
  )
  </code></pre>
  
  <p>and here is a sample scala template react.scala.html</p>
  
  <pre><code>@main("React in Webjar") {
  
      &lt;div id="content"&gt;&lt;/div&gt;
  
      &lt;script src="@routes.Assets.at("lib/react/react.js")" type="text/javascript" &gt;&lt;/script&gt;
      &lt;script src="@routes.Assets.at("lib/react/JSXTransformer.js")" type="text/javascript" &gt;&lt;/script&gt;
      &lt;script src="@routes.Assets.at("javascripts/reactApp.jsx")" type="text/jsx"&gt;&lt;/script&gt;
  }
  </code></pre>
  
  <p>I am using a Bower Webjars. I wonder if that can help.</p>