Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

handle node-fetch, whatwg-fetch Node polyfills #547

Merged
merged 1 commit into from Jun 28, 2020

Conversation

FredKSchott
Copy link
Owner

Resolves https://www.pika.dev/npm/snowpack/discuss/395

node-fetch is a Node-specific polyfill for the browser-native fetch API. It really should never make its way into your web-based project, but some npm dependencies reference it internally. At worst it will break (see discussion) and at best it's unnecessary bloat for your final build.

On the Pika CDN, we actually replace node-fetch and whatwg-fetch with native calls to the fetch API. This PR brings that same kind of handling to Snowpack.

@FredKSchott FredKSchott requested a review from a team as a code owner June 26, 2020 23:44
@vercel
Copy link

vercel bot commented Jun 26, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/pikapkg/snowpack/cvd76z0sc
✅ Preview: https://snowpack-git-handle-node-fetch.pikapkg.vercel.app

Copy link
Collaborator

@drwpow drwpow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯

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

Successfully merging this pull request may close these issues.

None yet

2 participants