Get root path package.json.
npm install -S @jswork/next-relative-package
import '@jswork/next-relative-package';
nx.relativePackage(); // { ...the whole package.json ... }
nx.relativePackage('publishConfig.registry'); // https://registry.npmjs.org/
Code released under the MIT license.