From a5bb19c8527ca40029be14abafe2c8458c727b11 Mon Sep 17 00:00:00 2001 From: Jordan Eldredge Date: Tue, 11 Mar 2025 16:11:52 -0700 Subject: [PATCH] Fix 'failed to parse skin' bug --- packages/skin-museum-client/src/index.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/packages/skin-museum-client/src/index.js b/packages/skin-museum-client/src/index.js index 7b02b212..db75aaab 100644 --- a/packages/skin-museum-client/src/index.js +++ b/packages/skin-museum-client/src/index.js @@ -1,3 +1,14 @@ +// There is some bug between how JSZip pulls in setimmediate (which it expects +// to polyfill `window.setimmediate` and our Webpack setup. The result is that +// one of our bundles is missing the polyfill. If we call JSZip code from within +// that bundle the polyfill is not present and we get an error. +// +// This explicit import should ensure that the polyfill is present in the +// entrypoint bundle and thus always set on `window`. +// +// We should be able to remove this once we root cause the bundling issue. +import "setimmediate"; + import React from "react"; import ReactDOM from "react-dom"; import { Provider } from "react-redux";