Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to change the reference to fastopt.js to opt.js in production #50

Open
hhimanshu opened this issue Jan 18, 2017 · 0 comments
Open

Comments

@hhimanshu
Copy link

hey @lihaoyi
First of all thanks for educating to many of us. I am working through example for server and client and in https://github.com/lihaoyi/workbench-example-app/blob/autowire-akka-http/example/jvm/src/main/scala/example/Server.scala#L21 I found

script(`type`:="text/javascript", src:="/client-fastopt.js")

This is fine for development, but when using sbt-native-packager, this will break because the file name renames to client-opt.js

> universal:packageBin
[info] Packaging /Users/Harit.Himanshu/IdeaProjects/q2/todoMvc-akka-http-scalajs/server/target/scala-2.12/server_2.12-0.1-SNAPSHOT-sources.jar ...
[info] Done packaging.
[info] Updating {file:/Users/Harit.Himanshu/IdeaProjects/q2/todoMvc-akka-http-scalajs/}server...
[info] Resolving jline#jline;2.14.1 ...
[info] Done updating.
[info] Main Scala API documentation to /Users/Harit.Himanshu/IdeaProjects/q2/todoMvc-akka-http-scalajs/server/target/scala-2.12/api...
[info] Wrote /Users/Harit.Himanshu/IdeaProjects/q2/todoMvc-akka-http-scalajs/server/target/scala-2.12/server_2.12-0.1-SNAPSHOT.pom
[info] Packaging /Users/Harit.Himanshu/IdeaProjects/q2/todoMvc-akka-http-scalajs/server/target/scala-2.12/server_2.12-0.1-SNAPSHOT-web-assets.jar ...
[info] Compiling 3 Scala sources to /Users/Harit.Himanshu/IdeaProjects/q2/todoMvc-akka-http-scalajs/server/target/scala-2.12/classes...
[info] Done packaging.
model contains 5 documentable templates
[info] Packaging /Users/Harit.Himanshu/IdeaProjects/q2/todoMvc-akka-http-scalajs/server/target/scala-2.12/server_2.12-0.1-SNAPSHOT.jar ...
[info] Done packaging.
[info] Main Scala API documentation successful.
[info] Packaging /Users/Harit.Himanshu/IdeaProjects/q2/todoMvc-akka-http-scalajs/server/target/scala-2.12/server_2.12-0.1-SNAPSHOT-javadoc.jar ...
[info] Done packaging.
[info] Wrote /Users/Harit.Himanshu/IdeaProjects/q2/todoMvc-akka-http-scalajs/shared/.jvm/target/scala-2.12/shared_2.12-0.1-SNAPSHOT.pom
[success] Total time: 3 s, completed Jan 17, 2017 3:58:44 PM
>

and

➜  scala-2.12 git:(master) ✗ ls                                                                                                         │
api                                     server_2.12-0.1-SNAPSHOT-sources.jar    server_2.12-0.1-SNAPSHOT.pom                            │
classes                                 server_2.12-0.1-SNAPSHOT-web-assets.jar                                                         │
server_2.12-0.1-SNAPSHOT-javadoc.jar    server_2.12-0.1-SNAPSHOT.jar                                                                    │
➜  scala-2.12 git:(master) ✗ jar -tvf server_2.12-0.1-SNAPSHOT-web-assets.jar                                                           │
    25 Tue Jan 17 15:58:42 PST 2017 META-INF/MANIFEST.MF                                                                                │
     0 Tue Jan 17 15:58:42 PST 2017 public/                                                                                             │
110345 Tue Jan 17 15:51:50 PST 2017 public/client-opt.js                                                                                │
   128 Tue Jan 17 15:58:40 PST 2017 public/client-launcher.js                                                                           │

How can we fix this? Thanks a lot again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant