vue-zoomer icon indicating copy to clipboard operation
vue-zoomer copied to clipboard

debounce.min.js causes "ReferenceError: window is not defined" from Vite SSG

Open J-Sek opened this issue 2 years ago • 0 comments

I generate pages with [email protected]. The process succeeds but the pages are not generated due to error. I have tried dynamic import, but it does not work either.

ReferenceError: window is not defined
    at file:///home/me/my-project/.vite-ssg-temp/main.mjs:2224:16

Points to:

// ...
}, Symbol.toStringTag, { value: "Module" }));
if (typeof global === "undefined")
  var global = window;
// ...

That can be found at the beginning of debounce.min.js.

J-Sek avatar Sep 18 '22 16:09 J-Sek