https://gist.github.com/lucacasonato/1a30a4fa6ef6c053a93f271675ef93fc
I haven't encountered such a problem, but you can try this.
polyfill.js you can try to download this file and import it from your worker file from your local project path and use it.