You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I'd love an example or wiki entry that explains how to use this component with requirejs, or to have an amd compatible version out of the box. is it possible?
The text was updated successfully, but these errors were encountered:
@jeacott You can shim backbone.offline when using require.js. You should set out your require.config as below:
require.config({baseUrl: 'scripts',paths:{'jquery': 'vendor/jquery/jquery','underscore': 'vendor/underscore/underscore',// amd fork'backbone': 'vendor/backbone/backbone',// amd fork'backbone.offline': 'vendor/backbone/backbone.offline'},shim:{// This is the important line for you. It tells require.js that backbone.offline depends on backbone. 'backbone.offline': ['backbone']}});
You'll likely also want to use the AMD forks of backbone and underscore which can be found at https://github.com/amdjs
Hi @ask11. I don't use the exports command and it seems to work. I'll look into it.
I'd be happy to help out with the documentation for the wiki if you like? Where is the best place to discuss this further?
Hi, I'd love an example or wiki entry that explains how to use this component with requirejs, or to have an amd compatible version out of the box. is it possible?
The text was updated successfully, but these errors were encountered: