Skip to content Skip to sidebar Skip to footer

Can't Get Backbone-relational To Work With Amd (requirejs)

I have the following Backbone router definition in CoffeeScript: // appointments_router.js.coffee define ['app', 'appointment'], (App) -> class Snip.Routers.AppointmentsRouter

Solution 1:

You can use a shim configuration with Require.. drop amd, backbone did..

take a look at https://github.com/DarrenHurst/BroadStreet

for how to configure shim.

Solution 2:

Turns out I need to require jQuery.

  shim:
    "underscore":
      exports: "_""backbone":
      deps: ["underscore", "jquery"]
      exports: "Backbone""relational":
      deps: ["backbone"]

Post a Comment for "Can't Get Backbone-relational To Work With Amd (requirejs)"