title: How to compile all included files into one using Babel?
body: <p>I am using Babel in my project. The thing is, I have this line of code in my <code>server.js</code>:</p>
  
  <pre><code>import schema from "./data/schema";
  </code></pre>
  
  <p>(<code>data/schema.js</code> is in ES2015 syntax).</p>
  
  <p>And when I am trying to compile my <code>server.js</code> with babel, like this:</p>
  
  <pre><code>babel -o server_production.js --minified  server.js
  </code></pre>
  
  <p>it produces a new file without errors and replaces <code>import</code> instruction with <code>require</code>. But the thing is, when I am trying to run my babel-compiled <code>server.js</code> with <code>node</code>, it complains about <code>data/schema.js</code>, because it wasn't transpiled into ES5, only required (the exact error is <code>Unexpected token "import"</code>, because I am using some other imports in <code>data/schema.js</code>).</p>
  
  <p>So, the question is: how can I compile my file and all the files it <code>import</code>s into one file? I tried <code>babel -o server_production.js --minified data/schema.js server.js</code>, but that didn't work either.</p>