d3-canvas-transition icon indicating copy to clipboard operation
d3-canvas-transition copied to clipboard

Webpack bundling

Open ekiwi111 opened this issue 6 years ago • 1 comments

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

ekiwi111 avatar Mar 20 '18 04:03 ekiwi111

Anyone can help out?

PhilTheAir avatar Oct 04 '18 03:10 PhilTheAir