I'm using ES6 to build my own version of d3 because I don't need the whole library.
How I build my own d3
import * as d3dispatch from 'd3-dispatch'
import * as d3drag from 'd3-drag'
import * as d3selection from 'd3-selection'
import * as d3transition from 'd3-transition'
import * as d3zoom from 'd3-zoom'
const d3 = Object.assign({}, d3dispatch, d3drag, d3drag, d3selection, d3zoom)
But I'm getting this error:
Uncaught TypeError: Cannot read property 'transform' of null
I'm using ES6 to build my own version of d3 because I don't need the whole library.
How I build my own d3
But I'm getting this error:
Uncaught TypeError: Cannot read property 'transform' of null
The error I'm getting is in this line:
Also tried this:
But I get this error:
Uncaught TypeError: Cannot add property dispatch, object is not extensible
Is there a way to compose d3 submodules with ES6?