GeoJSON to TopoJSON in Observable

I haven’t been able to figure out how to do GeoJSON to TopoJSON in @observablehq. What I want is to do the equivalent of geo2topo, but in the browser.

Here is as close as I have got:

But if you uncomment that first cell and load a big (200MB) GeoJSON (e.g. in the input it seems to crash the notebook.

Testing geo2topo works, and I also made it work in HTML:

My guess is that since topojson.topology modifies the original object, it might be messing with the reactivity. Not sure if this is the right place to post, but anyhow…