In order to extend map projections in D3 it's suggested to require the packages like this:
const d3 = require("d3")
require("d3-geo-projection")(d3)
That way, you can use for example d3-geo-projection's geoAiry method from the parent package:
d3.geoAiry()
Using import I'm doing this:
import * as d3 from 'd3'
import * as d3geo from 'd3-geo-projection'
But then the methods are not unified:
d3.geoMercator()
d3geo.geoAiry()
I tried this, but it doesn't work:
import * as d3 from 'd3'
import * as d3geo from 'd3-geo-projection'
d3geo(d3)
So, in short, what is the equivalent of require("d3-geo-projection")(d3) in ES6 syntax?