weightless icon indicating copy to clipboard operation
weightless copied to clipboard

Not working with server side rendering

Open mslourens opened this issue 4 years ago • 0 comments

I tried using this library with Sveltekit (SSR enabled), but got the following error:

21:54:40 [vite] Error when evaluating SSR module /node_modules/weightless/button/button.js:
ReferenceError: window is not defined
    at ../src/lib/template-result.ts:32:21
    at async instantiateModule (/Users/maurits/Documents/projects/personal/pianlibro/node_modules/vite/dist/node/chunks/dep-36bf480c.js:75140:9)`

mslourens avatar Sep 23 '21 19:09 mslourens