We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9ca5264 commit de1f7f1Copy full SHA for de1f7f1
packages/fiber/src/native/polyfills.ts
@@ -1,10 +1,19 @@
1
import * as THREE from 'three'
2
import { Image, NativeModules, Platform } from 'react-native'
3
import { Asset } from 'expo-asset'
4
-import * as fs from 'expo-file-system'
5
import { fromByteArray } from 'base64-js'
6
import { Buffer } from 'buffer'
7
+// Conditionally import expo-file-system/legacy to support Expo 54
8
+const getFileSystem = () => {
9
+ try {
10
+ return require('expo-file-system/legacy')
11
+ } catch {
12
+ return require('expo-file-system')
13
+ }
14
+}
15
+const fs = getFileSystem()
16
+
17
// http://stackoverflow.com/questions/105034
18
function uuidv4() {
19
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {
0 commit comments