Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions lib/index.react_native.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import 'fast-text-encoding';
import 'react-native-get-random-values';

Comment on lines -16 to -18
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree users should be able to bring their own polyfills, but removing these imports outright would be a breaking change.

A better approach for the current version would be conditional imports (similar to how we handle @react-native-async-storage/async-storage) - check if the globals already exist before requiring the polyfill packages.

import { Client, Config } from './shared_types';
import { getOptimizelyInstance, OptimizelyFactoryConfig } from './client_factory';
import { REACT_NATIVE_JS_CLIENT_ENGINE } from './utils/enums';
Expand Down