diff --git a/core/use-swr.ts b/core/use-swr.ts index e613d6b97..05a190ddc 100644 --- a/core/use-swr.ts +++ b/core/use-swr.ts @@ -1,5 +1,5 @@ import { useCallback, useRef, useDebugValue } from 'react' -import { useSyncExternalStoreWithSelector } from 'use-sync-external-store/shim/with-selector' +import { useSyncExternalStoreWithSelector } from 'use-sync-external-store/with-selector.js' import { defaultConfig, diff --git a/infinite/index.ts b/infinite/index.ts index 1f8fd4a61..9a5b55bfa 100644 --- a/infinite/index.ts +++ b/infinite/index.ts @@ -27,7 +27,7 @@ import type { SWRInfiniteFetcher, SWRInfiniteCacheValue } from './types' -import { useSyncExternalStore } from 'use-sync-external-store/shim' +import { useSyncExternalStore } from 'use-sync-external-store/shim/index.js' const INFINITE_PREFIX = '$inf$'