From f3c3f000781f7ea2f8b8b8beebb373aa5d7f6775 Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Tue, 29 Apr 2025 15:44:13 +0300 Subject: [PATCH] move URL polyfill to the polyfill file --- docs/build.md | 7 +++++-- src/App.native.tsx | 1 - src/platform/polyfills.ts | 1 + 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/docs/build.md b/docs/build.md index 7a29ab3553..7817dd0957 100644 --- a/docs/build.md +++ b/docs/build.md @@ -15,7 +15,7 @@ This is NOT required when developing for web. - Set up your environment [using the expo instructions](https://docs.expo.dev/guides/local-app-development/). - make sure that the JAVA_HOME points to the zulu-17 directory in your `.zshrc` or `.bashrc` file: `export JAVA_HOME=/Library/Java/JavaVirtualMachines/zulu-17.jdk/Contents/Home`. DO NOT use another JDK or you will encounter build errors. -- If you're running macOS, make sure you are running the correct versions of Ruby and Cocoapods:- +- If you're running macOS, make sure you are running the correct versions of Ruby and Cocoapods:- - If you are using Apple Silicon and this is the first time you are building for RN 0.74+, you may need to run: - `arch -arm64 brew install llvm` - `sudo gem install ffi` @@ -33,7 +33,7 @@ This is NOT required when developing for web. - After initial setup: - Copy `google-services.json.example` to `google-services.json` or provide your own `google-services.json`. (A real firebase project is NOT required) - `npx expo prebuild` -> you will also need to run this anytime `app.json` or native `package.json` deps change - + ### Running the Native App - iOS: `yarn ios` @@ -162,6 +162,9 @@ See [testing.md](./testing.md). `./platform/polyfills.*.ts` adds polyfills to the environment. Currently, this includes: - TextEncoder / TextDecoder +- react-native-url-polyfill +- Array#findLast (on web) +- atob (on native) ### Sentry sourcemaps diff --git a/src/App.native.tsx b/src/App.native.tsx index af51525449..8bcd5143d2 100644 --- a/src/App.native.tsx +++ b/src/App.native.tsx @@ -1,4 +1,3 @@ -import 'react-native-url-polyfill/auto' import '#/logger/sentry/setup' import '#/logger/bitdrift/setup' import '#/view/icons' diff --git a/src/platform/polyfills.ts b/src/platform/polyfills.ts index e9e233bc9f..47581eff4c 100644 --- a/src/platform/polyfills.ts +++ b/src/platform/polyfills.ts @@ -1,3 +1,4 @@ +import 'react-native-url-polyfill/auto' import 'fast-text-encoding' export {}