Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(angular): add support for passing additional shared dependencies…
… in the module federation config (#10156)
- Loading branch information
1 parent
0a1e822
commit b8c175f
Showing
5 changed files
with
410 additions
and
57 deletions.
There are no files selected for viewing
74 changes: 74 additions & 0 deletions
74
packages/angular/src/utils/mfe/__snapshots__/with-module-federation.spec.ts.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { joinPathFragments, readJsonFile, workspaceRoot } from '@nrwl/devkit'; | ||
import { existsSync } from 'fs'; | ||
|
||
export function readRootPackageJson(): { | ||
dependencies?: { [key: string]: string }; | ||
devDependencies?: { [key: string]: string }; | ||
} { | ||
const pkgJsonPath = joinPathFragments(workspaceRoot, 'package.json'); | ||
if (!existsSync(pkgJsonPath)) { | ||
throw new Error( | ||
'NX MFE: Could not find root package.json to determine dependency versions.' | ||
); | ||
} | ||
|
||
return readJsonFile(pkgJsonPath); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.