-
Notifications
You must be signed in to change notification settings - Fork 40
Description
The current ~UMD build doesn't correctly specify the crossfilter2 dependency for AMD style dependencies.
In particular, this is on the first line of the ~compiled reductio.js:
if("function"==typeof define&&define.amd)define([],e)And then it later tries to load crossfilter via:
var crossfilter = (typeof window !== "undefined" ? window['crossfilter'] : typeof global !== "undefined" ? global['crossfilter'] : null);I believe the dependency should be properly expressed via something like this:
if("function"==typeof define&&define.amd)define(['crossfilter2'],e)I'm sure this is all supposed to be handled by the build tools, but their current settings are causing me to have to export crossfilter2 as a global to use in an AMD environment.
For what it's worth, dc.js works well in an AMD environment. Their ~compiled form includes this definition:
if(typeof define === "function" && define.amd) {
define(["d3", "crossfilter2"], _dc);
}I realize this may not be a high priority for you, but I can always hope that it's an easy fix. Or at least I can warn other users (that might still be using an AMD environment).
Thanks for the nice tool. It's working very nicely in a 2-level aggregation scenario with a dc.js solution.