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

Use crossfilter2 in footer, on the AMD path. #1213

Closed
wants to merge 1 commit into from
Closed

Conversation

vprus
Copy link
Contributor

@vprus vprus commented Oct 11, 2016

I've tried to use current DC inside react, using https://github.com/facebookincubator/create-react-app, and DC could not find crossfilter. Looks like 'crossfilter' was changed to 'crossfilter2' on one path, but not another. I have no idea why react build process uses AMD modules, but this patch fixes the error.

@gordonwoodhull
Copy link
Contributor

Thanks @vprus, over in npm-land we don't have a problem with the module name being different from the filename, but I guess the create-react-app uses webpack so we run into #1214.

We may have to fix this on the crossfilter side.

@gordonwoodhull
Copy link
Contributor

@vprus, does the resolve config described in #1214 also work for you?

This solution breaks vanilla AMD, and I'd rather keep the crossfilter.js filename for crossfilter/crossfilter. Although it's unfortunate that having a different module name and filename causes so much confusion.

@gordonwoodhull
Copy link
Contributor

I'm going to write this off as a configuration issue, unless I hear otherwise.

It's unfortunate that the module name is different from the filename (and the function object name), but that's where we are at. Maybe someday the community fork of crossfilter will change enough to merit its own name, but for now it is a drop-in replacement

gordonwoodhull added a commit that referenced this pull request May 24, 2017
this breaks requireJS but fixes webpack - since the community fork of
crossfilter has a different package name from its filename, one or the
other packaging system is going to be unhappy.

requireJS users will need to rename crossfilter.js to crossfilter2.js
when copying it into position, or use the requireJS paths or map
configuration options to specify that the filename is different from the
module name.

http://requirejs.org/docs/api.html#config-paths
http://requirejs.org/docs/api.html#config-map

fixes #1213
fixes #1214
fixes #1261
fixes #1293
fixes #1302
breaks #1304!
@gordonwoodhull
Copy link
Contributor

As of dc.js 2.0.3 / 2.1.6, we'll break requireJS compatibility in favor of webpack compatibility.

See #1304 if this creates problems for you.

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

Successfully merging this pull request may close these issues.

None yet

2 participants