We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 83e8107 commit a3e65d0Copy full SHA for a3e65d0
libs/native-federation-core/src/lib/utils/package-info.ts
@@ -54,6 +54,10 @@ export function getPackageInfo(
54
workspaceRoot = normalize(workspaceRoot, true);
55
projectRoot = normalize(projectRoot, true);
56
57
+ if (!projectRoot.startsWith(workspaceRoot)) {
58
+ throw new Error(`Workspace folder ${workspaceRoot} needs to be a parent of the project folder ${projectRoot}`);
59
+ }
60
+
61
let currentPath = projectRoot;
62
63
while (workspaceRoot !== currentPath) {
@@ -81,7 +85,6 @@ export function _getPackageInfo(
81
85
currentPath: string,
82
86
): PackageInfo | null {
83
87
84
-
88
const mainPkgName = getPkgFolder(packageName);
89
90
const mainPkgPath = path.join(currentPath, 'node_modules', mainPkgName);
0 commit comments