From bce37dc964c4a0ae5c2aeeecf83606f600b53478 Mon Sep 17 00:00:00 2001 From: Jiachi Liu Date: Sat, 14 May 2022 11:14:32 +0200 Subject: [PATCH 1/2] build: import with-selector with extension from useESE --- core/use-swr.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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, From 106d2b059fa70d2b9b3f4420becfa7817e72aa1c Mon Sep 17 00:00:00 2001 From: Jiachi Liu Date: Sat, 14 May 2022 13:30:50 +0200 Subject: [PATCH 2/2] fix shim import --- infinite/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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$'