1"use strict"; 2var __importDefault = (this && this.__importDefault) || function (mod) { 3 return (mod && mod.__esModule) ? mod : { "default": mod }; 4}; 5Object.defineProperty(exports, "__esModule", { value: true }); 6const expo_modules_core_1 = require("expo-modules-core"); 7const qs_1 = __importDefault(require("qs")); 8const getDevServer = () => { 9 // Disable for SSR 10 if (!expo_modules_core_1.Platform.isDOMAvailable) { 11 return { 12 bundleLoadedFromServer: true, 13 fullBundleUrl: '', 14 url: '', 15 }; 16 } 17 return { 18 // The bundle is always loaded from a server in the browser. 19 bundleLoadedFromServer: true, 20 /** URL but ensures that platform query param is added. */ 21 get fullBundleUrl() { 22 if (document?.currentScript && 'src' in document.currentScript) { 23 return document.currentScript.src; 24 } 25 const url = window.location.toString(); 26 const query = qs_1.default.parse(url); 27 return (location.origin + 28 location.pathname + 29 '?' + 30 qs_1.default.stringify({ ...query, platform: expo_modules_core_1.Platform.OS })); 31 }, 32 url: location.origin + location.pathname, 33 }; 34}; 35exports.default = getDevServer; 36//# sourceMappingURL=getDevServer.js.map