eligrey / eligrey/FileSaver.js
Undefined module for AMD loaders since 2.x
Open
- Dominant language
- JavaScript
- Stars
- 22k
- Forks
- 4.3k
- PR merge metrics
- No merged PRs in 30d
Description
Using FileSaver.js prior to the 2.x release worked fine with AMD based loaders. Now the factory method does not return `saveAs`, so the AMD module is undefined.
Not sure how this would impact other loaders, but this would fix it for AMD users:
```
(...)
_global.saveAs = saveAs.saveAs = saveAs;
if (typeof module !== 'undefined') {
module.exports = saveAs;
}
return saveAs; // This would fix the problem with AMD based loaders
```
Thanks
Chris
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.