Open gabalmat-csg opened 8 years ago
Has anyone successfully loaded this module with require()? I'm assuming a shim is needed, but I can't figure out what it should look like. Right now I have:
require.config({ paths: { "d3": "https://d3js.org/d3.v3.min", "d3.slider": "lib/d3.slider" }, shim: { "d3.slider": { "deps": ["d3"], "exports": "d3" } } }); console.log(d3.version); d3.select("#time_slider").call(d3.slider());
This logs: 3.5.17 TypeError: d3.slider is not a function
I'm using webpack to import and it appears to work well like this.
d3.slider = require('d3.slider');
Don't forget the css file!
require('!style!css!d3.slider/d3.slider.css');
Has anyone successfully loaded this module with require()? I'm assuming a shim is needed, but I can't figure out what it should look like. Right now I have:
require.config({ paths: { "d3": "https://d3js.org/d3.v3.min", "d3.slider": "lib/d3.slider" }, shim: { "d3.slider": { "deps": ["d3"], "exports": "d3" } } }); console.log(d3.version); d3.select("#time_slider").call(d3.slider());
This logs: 3.5.17 TypeError: d3.slider is not a function