Update index.js
This commit is contained in:
parent
8967e27a44
commit
15c64388df
5
index.js
5
index.js
|
@ -261,7 +261,12 @@ const pkg = getPackageJson();
|
|||
})();
|
||||
|
||||
function getPackageJson() {
|
||||
|
||||
const pathToPackage = path.join(workspace, 'package.json');
|
||||
console.log({
|
||||
pathToPackage,
|
||||
workspace,
|
||||
})
|
||||
if (!existsSync(pathToPackage)) throw new Error("package.json could not be found in your project's root.");
|
||||
return require(pathToPackage);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue