Matter.js multiple sprites/textures when using poly-decomp in ESM

I am building a simple prototype 2D physics collider editor web app where the problem can be easily recreated.
Tool runtime: https://phys-ed.glitch.me/
With code: https://glitch.com/edit/#!/phys-ed?path=script.js

When I try to use poly-decomp.js to decompose the collider shape (tick ‘Decompose’ checkbox) the resulting body in matter.js has multiple sprites/textures, one per decomposed polygon I guess.

I am using vanilla ESM with no compile step so I wonder if this is a limitation/bug in the libraries which don’t have native ESM support as far as I know or if I am missing some step as I haven’t used poly-decomp.js previously.

Most pertinent code is likely here:
https://github.com/joegaffey/phys-ed/blob/main/script.js#L158
and here:
https://github.com/joegaffey/phys-ed/blob/main/script.js#L188