-
Notifications
You must be signed in to change notification settings - Fork 43
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
Demonstrate using requirejs optimized files? #16
Comments
This should "just work" but sounds like there is an issue somewhere. I thought #15 fixed this. |
When I run
From reading the play docs, it sounds like its optimizer only runs over javascript files in So, in my own project, I moved my js code there. When I run
jQuery is loaded properly from webjars when I run in dev mode, so I'm not sure what is happening there. When I try to run my app in production mode, my |
Well this is nasty but RequireJS needs to see the WebJar contents for some reason. And the WebJar contents are inside Jars. Here is a possible workaround: This all gets better in Play 2.3 with sbt-web. Until then we might need some hacks. |
In that case, you aren't actually using the webjars, right? you are just using dependencies from a CDN? |
That is just for the requirejs optimizer to run. I don't think in this case it actually uses them from the CDN at runtime because I'm not actually using that config at runtime. |
I am trying to figure out how to use the RequireJs optimizer that seems to be built into Play with Webjars. Does it work? I notice that if I run this sample app in production mode, it is still making individual requests for each file. Could you make the changes needed to optimize the js loading, so I can hopefully see what I am doing wrong in my project?
Thanks!
The text was updated successfully, but these errors were encountered: