UNPKG

@macrof/cli

Version:

React MicroFrontend compiler, Typescript, Webpack 5, ModuleFederation

10 lines (9 loc) 327 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getUrl = void 0; const getUrl = (externalLink) => { const link = new URL(externalLink.replace(/^.*@/, '')); const path = link.pathname.split('/').slice(0, -1).join('/'); return `${link.origin}${path}`; }; exports.getUrl = getUrl;