Solution

babel/babel#10745 (comment)

Instructions

Run yarn, then yarn build.

It should give you the following error:

error

Then in the entry.js, use the ./esm import, instead of the cjs one.

Then it will compile fine:

ok