d3-canvas-transition
d3-canvas-transition copied to clipboard
Webpack bundling
Is there a way to bundle this plugin with d3 using Webpack?
I found a way to import some of the functions through:
import * as d3base from 'd3';
import { getSize, resolution, selectCanvas } from 'd3-canvas-transition';
const d3 = Object.assign(d3base, { getSize, resolution, selectCanvas });
But some can't be imported, because they applied to selection.prototype
directly.
And I keep getting an error in the console ....attr(...).canvasResolution is not a function
Anyone can help out?