Skip to content

Commit

Permalink
Add default export to browser-ponyfill.js.
Browse files Browse the repository at this point in the history
Fixes #26.
  • Loading branch information
mattmccutchen authored and lquixada committed Oct 25, 2018
1 parent 905a0e2 commit ce6897f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions dist/browser-ponyfill.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/node-ponyfill.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ export default [
if (typeof module === 'object' && module.exports) {
module.exports = fetch;
// Needed for TypeScript consumers without esModuleInterop.
module.exports.default = fetch;
}
`)
},
Expand Down
2 changes: 1 addition & 1 deletion src/node-ponyfill.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ exports.Headers = nodeFetch.Headers
exports.Request = nodeFetch.Request
exports.Response = nodeFetch.Response

// Needed for TypeScript.
// Needed for TypeScript consumers without esModuleInterop.
exports.default = fetch

0 comments on commit ce6897f

Please sign in to comment.