title: NPM Run Build Always Builds Production and Never Development
body: <p>On an inherited project I have, I am trying to get the build command to build a version other than <code>Production</code>. </p>
  
  <p>I have attempted to change the alias in the <code>script</code> section in <code>package.json</code> to pass in extra variables such as <code>--dev</code> and <code>--configuration=dev</code> to no avail. </p>
  
  <hr>
  
  <p>The project has these json data files:</p>
  
  <pre><code> env.dev
   env.development
   env.production
  </code></pre>
  
  <p>with the <code>package.json</code> has this build alias <code>build:dev</code> which I run <code>npm run build:dev</code>:</p>
  
  <pre><code>"scripts": {
      "start": "NODE_ENV=dev &amp;&amp; react-scripts start",
      …
      "build:dev": "npm run build --dev --configuration=dev &amp;&amp; react-scripts build"
  }
  </code></pre>
  
  <p>This works and builds, but for production only which I verify when I view the resultant files.</p>
  
  <hr>
  
  <p>If I remove the file <code>env.production</code> from the directory and run the build command, it fails with:</p>
  
  <pre><code>Creating an optimized production build...
  Failed to compile.
  
  Module not found: Error: Can't resolve 'polyfills' in 'C:\Work\MyProj\WebSiteName\src'
  </code></pre>
  
  <p>which just informs me that it can alias <code>polyfills</code> found in the <code>env.production</code> file for the location <code>NODE_PATH=src/</code>.</p>
  
  <p>Thoughts?</p>