universal-github-app-jwt is a universal library with different code for Node/Browser. It has a "browser" key to override the entry point for browser builds:
|
"browser": { |
|
"./pkg/dist-src/get-token.js": "./pkg/dist-src/get-token-browser.js" |
|
}, |
Unfortunately build tools such as WebPack end up using this entry point, too, even when building for Node targets. See for example: octokit/auth-app.js#59. There has been a lot of discussion around this topic, but no conclusion on how to resolve it.
But the least we could do is to check if atob exists in src/utils.ts. If it doesn't, then throw a helpful error which could include a link to the README file where we could add some information about this challenge.
universal-github-app-jwtis a universal library with different code for Node/Browser. It has a"browser"key to override the entry point for browser builds:universal-github-app-jwt/package.json
Lines 4 to 6 in ac358a2
Unfortunately build tools such as WebPack end up using this entry point, too, even when building for Node targets. See for example: octokit/auth-app.js#59. There has been a lot of discussion around this topic, but no conclusion on how to resolve it.
But the least we could do is to check if
atobexists in src/utils.ts. If it doesn't, then throw a helpful error which could include a link to the README file where we could add some information about this challenge.