UMD module not added to global/window in browser
See original GitHub issueThe UMD module if statement doesnt fall back to adding itself to the global variable (window in the browser).
This is the fallback that is missing (from the umdjs repo example): https://github.com/umdjs/umd/blob/master/templates/returnExports.js#L26-L29
Also, how come the different versions arent added side by side in the latest version (with a .umd.js
suffix for example) and instead have their own version?
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
umd module compiler option doesn't have a fallback for global ...
I was disappointed when I saw my UMD module did not work in browser. Standard or not, UMD means something to web developers...
Read more >Why do I need to set global.window when using UMD in Node?
But when I want to use it in a node script I have to declare window first like this... // WTF global.window =...
Read more >Add Rollup Configuration | Building an NPM Package with ...
Add Rollup Configuration | Building an NPM Package with TypeScript. First, let's explain what ES modules / Commonjs / IIFE / UMD are....
Read more >The struggles of publishing a JavaScript library - Nolan Lawson
One way this might manifest itself is that you expect a global window variable to exist in the browser – but oh no,...
Read more >javascript global is not defined - You.com | The AI Search ...
declare module '@walletconnect/web3-provider/dist/umd/index.min.js' ... Angular 7: Uncaught ReferenceError: global is not defined when adding package.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yeah I just wanted to offer the pr. You are of course free to close it if you dont want to offer UMD modules 😃
This is now merged, UMD module is available in ./dist.