Skip to content
This repository has been archived by the owner on Oct 10, 2022. It is now read-only.

Work around strange webpack behavior for node-fetch imports #35

Merged
merged 2 commits into from
Jan 31, 2019

Conversation

bcomnes
Copy link
Contributor

@bcomnes bcomnes commented Jan 31, 2019

Sometimes webpack will import node-fetch with a default export property, and other times with a commonjs default export function. You never know which one you are gonna get! This makes it work in both cases.

Sometimes webpack will import node-fetch with a default export property, and other times with a commonjs default export.  You never know which one you are gonna get!
@bcomnes bcomnes self-assigned this Jan 31, 2019
@bcomnes
Copy link
Contributor Author

bcomnes commented Jan 31, 2019

This fixes the library to work in netlify-lambda.

@bcomnes bcomnes merged commit 14d2d96 into master Jan 31, 2019
@bcomnes bcomnes deleted the fix-fetch-import branch January 31, 2019 23:17
@coveralls
Copy link

Coverage Status

Coverage increased (+0.08%) to 64.184% when pulling 0253be0 on fix-fetch-import into 27f6ce3 on master.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants