D3.layout module import woes

If you don’t specify a version range with your require, you’ll get the latest version of the d3 which is 4.13.0 (and very soon 5.0.0!). The phylotree module appears to require D3 3.x, so try this:

d3 = {
  const d3 = window.d3 = await require('d3@3');
  await require('phylotree@0.1').catch(() => {});
  return d3;
}

(I also removed the use of wrzd.in since that doesn’t look necessary for the phylotree module, and it currently appears down.)