We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 30fb572 commit 96b633aCopy full SHA for 96b633a
src/lib/helpers.ts
@@ -1,4 +1,3 @@
1
-import crossFetch from 'cross-fetch'
2
import { SupportedStorage } from './types'
3
4
export function expiresAt(expiresIn: number) {
@@ -34,7 +33,7 @@ export const resolveFetch = (customFetch?: Fetch): Fetch => {
34
33
if (customFetch) {
35
_fetch = customFetch
36
} else if (typeof fetch === 'undefined') {
37
- _fetch = crossFetch as unknown as Fetch
+ _fetch = async (...args) => await (await import('cross-fetch')).fetch(...args)
38
} else {
39
_fetch = fetch
40
}
0 commit comments