Skip to content

Commit 3f9010e

Browse files
committed
separate seralize imports
1 parent 125f637 commit 3f9010e

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/index/serialize.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
import type { Key } from '../_internal'
2-
import { serialize } from '../_internal'
2+
import { serialize } from '../_internal/utils/serialize'
33

44
export const unstable_serialize = (key: Key) => serialize(key)[0]

src/infinite/serialize.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import type { SWRInfiniteKeyLoader } from './types'
2-
import { serialize, INFINITE_PREFIX } from '../_internal'
2+
import { serialize } from '../_internal/utils/serialize'
3+
import { INFINITE_PREFIX } from '../_internal/constants'
34

45
export const getFirstPageKey = (getKey: SWRInfiniteKeyLoader) => {
56
return serialize(getKey ? getKey(0, null) : null)[0]

0 commit comments

Comments
 (0)