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