title: Generate package.json on nx build / deployment
body: <p>I've a monorepo using nx with multiple node/nestjs apps. Some of the apps doesn't require all the packages used in the other apps. Because it's a monorepo, I need to install all packages for every apps during the deployment. </p>
  
  <p>Is there a way generate a package.json on build that would contain only the packages needed for the app that I'm building?</p>
  
  <p>I've tryed to use "generate-package-json-webpack-plugin" to generate the package.json, but it only detect half the dependencies.</p>
  
  <p>I've also tried to build a single js file containing all the apps, but it doesn't seem to work and always require tslib.</p>