3

After upgrade to Play 2.3, requirejs is able to bundle and unglify all paths into the one main file ONLY if the path's come from a webjar.

Ie. if the config section of my require loos like this

paths: {
    bacon: '../lib/baconjs/Bacon.min', // comes from "org.webjars" % "baconjs" % "0.7.2"
    'bacon.model': 'libs/bacon.model-0.1.6'

Then Bacon.min.js is correctly bundled into my main.js file but the bacon.model library is downloaded separately via a http call.

I have a bunch of javascript depedencies that are not yet "webjared" so I am trying to find and easy way around this instead of making webjars of all dependancies not provided by webjars.org

  • 1
    Do you know how to achieve it with vanilla rjs? Because in that case you can actually provide the entire configuration to it from your SBT build (we recently did this to make some special require stuff work as we wanted). The key buildProfile is your friend! (See the docs at https://github.com/sbt/sbt-rjs) – johanandren Jul 19 '14 at 17:04
  • Can you paste your complete config? I think the problem is somewhere else. – bjoernhaeuser Jan 12 '15 at 07:33
  • I have since moved on from the role in which this problem existed (ie. no access to the source any more). – paddy mcpaddison Jan 13 '15 at 08:55

0 Answers0