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

Dynamic loading of node-fetch #591

Closed
brioux opened this issue Jul 26, 2022 · 0 comments
Closed

Dynamic loading of node-fetch #591

brioux opened this issue Jul 26, 2022 · 0 comments
Assignees

Comments

@brioux
Copy link
Member

brioux commented Jul 26, 2022

Update import fetch from 'node-fetch'
using the following dynamic import
import { RequestInfo, RequestInit } from 'node-fetch'; const fetch = (url: RequestInfo, init?: RequestInit) => import('node-fetch').then(({ default: fetch }) => fetch(url, init));

Because this package was converted to be an ESM only package in version 3

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

No branches or pull requests

2 participants