title: Development only workspace
body: <p>I am planning to split some of the code in my project to NPM/Yarn workspaces. But some of the workspaces will be used only during development. Just to be clear, I am not referring to devDependencies for the workspace. The workspace itself is a devDependency of the root project.</p>
  <p>How can I ignore these workspaces from a production installation?</p>
  <pre><code>yarn install --production --frozen-lockfile
  </code></pre>
  <p>installs the production dependencies for the dev only workspaces.</p>
  <p>If I run the above command after removing the dev only workspace directories from the production server, the installation fails since the lockfile will be modified.</p>
  <p>How can I maintain a development only dependency as workspace, and yet prevent its installation on production build. I don't particularly prefer Yarn, NPM or PNPM. I would appreciate suggestions that will work on any of them.</p>