Skip to content
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

AMD + RequireJS support #114

Closed
GordonSmith opened this issue May 7, 2014 · 7 comments
Closed

AMD + RequireJS support #114

GordonSmith opened this issue May 7, 2014 · 7 comments

Comments

@GordonSmith
Copy link

Would it be possible to add AMD loader support (for us poor dojo developers)?

Something similar to:
https://github.com/dc-js/dc.js/pull/590/files

@paulboone
Copy link

+1. I'm trying to get this working myself on a CrossFilter / DC / D3 stack using Twitter Flight and RequireJS. I don't know enough yet about AMD or I'd attempt to submit a patch myself.

@reedspool
Copy link

I successfully used RequireJS's shim config:

require.config({
  paths: {
    "crossfilter": "/bower_components/crossfilter/crossfilter"
  },
  shim: {
    'crossfilter': {
      deps: [],
      exports: 'crossfilter'
    }
  }
});

Hope this helps while we wait for this!

@infacq
Copy link

infacq commented Jul 10, 2014

+1

@lord-xeon
Copy link

@reedspool
I tried the shim config, and I keep getting "not-a-module" using the hacked together dojo version of require.js

@reedspool
Copy link

@lord-xeon I'm sorry that's happening. I am not familiar with dojo, but perhaps their version of require.js is older than the shim? I don't know what version shims came around, but I am sure they were not always part of the spec.

Are you able to use other, sure-fire shims? Underscore.js is commonly shim'd like this, for example.

@lord-xeon
Copy link

Yes, other shims work, such as d3.

dojo uses their own custom version of require.js which makes it just about impossible to use any "AMD ready" plugin I would like (moment.js, Pnotify, etc.)

@rathko
Copy link

rathko commented Oct 13, 2015

@reedspool Thanks very much, your solution works for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants