ReferenceError: window is not defined
at ../../node_modules/.pnpm/atob@2.1.2/node_modules/atob/browser-atob.js (/Users/vsantos/work/pl/gh/nftstorage/nftstorage.link/packages/api/dist/worker.mjs:2363:8)
at __require (/Users/vsantos/work/pl/gh/nftstorage/nftstorage.link/packages/api/dist/worker.mjs:8:50)
at /Users/vsantos/work/pl/gh/nftstorage/nftstorage.link/packages/api/dist/worker.mjs:5122:27
🧩 Steps to Reproduce
Install in a web worker project
Build using ESM (or any other)
🤔 Expected behavior
ESM Build works
😮 Actual behavior
ESM build fails
💻 Code Sample
[If possible, please provide a code repository, gist, code snippet or sample files to reproduce the issue.]
✅ Prerequisites
@magic-sdk/admin
)?🐛 Description
Since version
1.4.1
as a result of https://github.com/magiclabs/magic-admin-js/pull/88 fails to build in web workers due to https://git.coolaj86.com/coolaj86/atob.js/issues/5 .Fails with:
🧩 Steps to Reproduce
🤔 Expected behavior
ESM Build works
😮 Actual behavior
ESM build fails
💻 Code Sample
[If possible, please provide a code repository, gist, code snippet or sample files to reproduce the issue.]
🌎 Environment
@magic-sdk/admin
yarn