@nx/react
Version:
13 lines (12 loc) • 489 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.addRemoteToDynamicHost = addRemoteToDynamicHost;
function addRemoteToDynamicHost(tree, remoteName, remotePort, pathToMfManifest) {
if (tree.exists(pathToMfManifest)) {
const current = tree.read(pathToMfManifest, 'utf8');
tree.write(pathToMfManifest, JSON.stringify({
...JSON.parse(current),
[remoteName]: `http://localhost:${remotePort}`,
}));
}
}
;