title: Babel doesn't ignore node_modules directory, although it is in "ignore" config
body: <p>For some reason <code>babel</code> doesn't ignore <code>node_modules</code> directory, although I specified it in <code>&quot;ignore&quot;</code> field of <code>.babelrc</code> file. Why does it happen? How to make <code>babel</code> act as expected?</p>
  <p>My goal is to compress and mangle all <code>.js</code> files in my ExpressJS app (particularly my all back end code) before I push my app to remote repo and then to server. So I use <code>babel</code> and <code>babili</code>.</p>
  <p>Here is my <code>.babelrc</code> config:</p>
  <pre><code>{
      &quot;presets&quot;: [
          [&quot;latest&quot;, {
              &quot;modules&quot;: false
          }]
      ],
      &quot;env&quot;: {
          &quot;development&quot;: {
              &quot;presets&quot;: [&quot;stage-0&quot;, &quot;react&quot;, &quot;babili&quot;]
          },
          &quot;production&quot;: {
              &quot;presets&quot;: [&quot;stage-0&quot;, &quot;react&quot;, &quot;babili&quot;]
          }
      },
      &quot;ignore&quot;: [
          &quot;node_modules&quot;,
          &quot;assets&quot;,
          &quot;view&quot;,
          &quot;public&quot;,
          &quot;test&quot;,
          &quot;spec&quot;,
          &quot;logs&quot;,
          &quot;lib/jasmine_examples&quot;,
          &quot;db&quot;
      ]
  }
  </code></pre>
  <p>And I run <code>babel</code> from command line like this:</p>
  <pre><code>./node_modules/.bin/babel . -d ~/app_compressed/
  </code></pre>
  <p>And <code>babel</code> starts compressing <code>node_modules</code> directory:</p>
  <pre><code>node_modules\apache-crypt\gensrc\index.js -&gt; C:\Users\user\app_compressed\node_modules\apache-crypt\gensrc\index.js
  node_modules\apache-md5\gensrc\index.js -&gt; C:\Users\user\app_compressed\node_modules\apache-md5\gensrc\index.js
  node_modules\babel-preset-env\data\built-in-features.js -&gt; C:\Users\user\app_compressed\node_modules\babel-preset-env\data\built-in-features.js
  node_modules\babel-preset-env\data\plugin-features.js -&gt; C:\Users\user\app_compressed\node_modules\babel-preset-env\data\plugin-features.js
  node_modules\babel-preset-env\lib\default-includes.js -&gt; C:\Users\user\app_compressed\node_modules\babel-preset-env\lib\default-includes.js
  node_modules\babel-preset-env\lib\index.js -&gt; C:\Users\user\app_compressed\node_modules\babel-preset-env\lib\index.js
  </code></pre>
  <p>Literally wrong behavior. How to fix it? How to make <code>babel</code> ignore folders specified in config?</p>