1"use strict"; 2/** 3 * Copyright © 2022 650 Industries. 4 * 5 * This source code is licensed under the MIT license found in the 6 * LICENSE file in the root directory of this source tree. 7 */ 8Object.defineProperty(exports, "__esModule", { value: true }); 9exports.buildUrlForBundle = void 0; 10/** 11 * Given a path and some optional additional query parameters, create the dev server bundle URL. 12 * @param bundlePath like `/foobar` 13 * @param params like `{ platform: "web" }` 14 * @returns a URL like "/foobar.bundle?platform=android&modulesOnly=true&runModule=false&runtimeBytecodeVersion=null" 15 */ 16function buildUrlForBundle(bundlePath) { 17 // NOTE(EvanBacon): This must come from the window origin (at least in dev mode). 18 // Otherwise Metro will crash from attempting to load a bundle that doesn't exist. 19 return '/' + bundlePath.replace(/^\/+/, ''); 20} 21exports.buildUrlForBundle = buildUrlForBundle; 22//# sourceMappingURL=buildUrlForBundle.js.map