Closed benmccann closed 10 years ago
Okay figured this one out. I broke the r.js static analysis with my script
Doesn't work:
var deps = ['a', 'b', 'c'];
require(deps);
Does work:
require(['a', 'b', 'c']);
There's a bug in sbt-rjs. That logging should use log.info(...)
not log(...)
What I expect
I believe the way this is supposed to work is that with "play run" all the js is loaded in as it appears in my editor and with "play start" all the files are supposed to be concatenated together and then optimized.
What actually happens
When I do "play run" and when I do "play start" my main.js looks exactly the same in both instancess with each file being optimized independently. I would think no optimization should happen in dev mode and that in prod mode that there would be some concatenation happening first.
My setup
I see that SbtRjs is enabled in my project and I've also set "pipelineStages := Seq(rjs)". I'm not sure what else to look into. I see another open bug for adding logging. It seems like that would be helpful here as well so that I could enable debug logging since the plugin seems to not be working for me
Debugging
It seems I need to delete the following directory to cause it to try to optimize again.
Once I do that I can get it to say "Optimizing JavaScript with RequireJS", but my main.js still isn't actually optimized