Skip to content

Commit 82b75ce

Browse files
authored
Fixed metro interop issues with peer deps (#2739)
Co-authored-by: mfbz <mfbz@users.noreply.github.com>
1 parent 3f06ca9 commit 82b75ce

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

‎.changeset/funny-radios-lick.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@onflow/fcl-react-native": minor
3+
---
4+
5+
Fixed metro interop issues with peer deps

‎packages/fcl-react-native/src/utils/react-native/storage.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
import AsyncStorage from "@react-native-async-storage/async-storage"
1+
// Use require() to avoid Rollup/Metro interop issues with peer dependencies
2+
// eslint-disable-next-line @typescript-eslint/no-var-requires
3+
const AsyncStorage =
4+
require("@react-native-async-storage/async-storage").default
25

36
const safeParseJSON = (str?: string | null) => {
47
if (str == null) return null

0 commit comments

Comments
 (0)