diff --git a/core/src/use-swr.ts b/core/src/use-swr.ts index 2d40dc85a..8480ea805 100644 --- a/core/src/use-swr.ts +++ b/core/src/use-swr.ts @@ -5,7 +5,7 @@ import ReactExports, { useDebugValue, useMemo } from 'react' -import { useSyncExternalStore } from 'use-sync-external-store/shim' +import { useSyncExternalStore } from 'use-sync-external-store/shim/index.js' import { defaultConfig, diff --git a/infinite/src/index.ts b/infinite/src/index.ts index c2ae16cf0..d51b8eaa4 100644 --- a/infinite/src/index.ts +++ b/infinite/src/index.ts @@ -33,7 +33,7 @@ import type { SWRInfiniteCacheValue, SWRInfiniteCompareFn } from './types' -import { useSyncExternalStore } from 'use-sync-external-store/shim' +import { useSyncExternalStore } from 'use-sync-external-store/shim/index.js' import { getFirstPageKey } from './serialize' // const INFINITE_PREFIX = '$inf$'