Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

[RN] Polyfill __filename ASAP

Lyubo Marinovf35578c80373
diff --git a/react/features/base/lib-jitsi-meet/native/index.js b/react/features/base/lib-jitsi-meet/native/index.js
index d9de91d72c..4d0b1f5643 100644
--- a/react/features/base/lib-jitsi-meet/native/index.js
+++ b/react/features/base/lib-jitsi-meet/native/index.js
@@ -1,3 +1,2 @@
import './polyfills-browser';
-import './polyfills-browserify';
import './WiFiStats';
diff --git a/react/features/base/lib-jitsi-meet/native/polyfills-browserify.js b/react/features/base/lib-jitsi-meet/native/polyfills-bundler.js
similarity index 100%
rename from react/features/base/lib-jitsi-meet/native/polyfills-browserify.js
rename to react/features/base/lib-jitsi-meet/native/polyfills-bundler.js
diff --git a/react/index.native.js b/react/index.native.js
index 0d9b3a3b46..7c2d1e12e4 100644
--- a/react/index.native.js
+++ b/react/index.native.js
@@ -1,6 +1,16 @@
-// FIXME: remove once react-native-webrtc and react-native-prompt imports
-// PropTypes from the 'prop-types' lib instead of 'react'.
-import './features/base/react/prop-types-polyfill.js';
+// FIXME The bundler-related (and the browser-related) polyfills were born at
+// the very early days of prototyping the execution of lib-jitsi-meet on
+// react-native. Today, the feature base/lib-jitsi-meet should not be
+// responsible for such polyfills because it is not the only feature relying on
+// them. Additionally, the polyfills are usually necessary earlier than the
+// execution of base/lib-jitsi-meet (which is understandable given that the
+// polyfills are globals). The remaining problem to be solved here is where to
+// collect the polyfills' files.
+import './features/base/lib-jitsi-meet/native/polyfills-bundler';
+
+// FIXME: Remove once react-native-webrtc and react-native-prompt import
+// PropTypes from 'prop-types' instead of 'react'.
+import './features/base/react/prop-types-polyfill';
import PropTypes from 'prop-types';
import React, { Component } from 'react';