Files
emaui/node_modules/@module-federation/dts-plugin/dist/esm/utils-CkPvDGOy.mjs
2026-05-29 15:23:46 +03:00

13 lines
349 B
JavaScript

//#region src/dev-worker/utils.ts
const DEFAULT_LOCAL_IPS = ["localhost", "127.0.0.1"];
function getIpFromEntry(entry, ipv4) {
let ip;
entry.replace(/https?:\/\/([0-9|.]+|localhost):/, (str, matched) => {
ip = matched;
return str;
});
if (ip) return DEFAULT_LOCAL_IPS.includes(ip) ? ipv4 : ip;
}
//#endregion
export { getIpFromEntry as t };