title: Webpack: how does Webpack work internally?
body: <p>As far as I could understand, Webpack is a tool for organizing assets in the project. However, I don't understand how it works internally and it seems a bit magical.</p>
  
  <ul>
  <li>Is there some kind of runtime engine resolving modules or dependencies?</li>
  <li>Does it run on the server or in the client browser?
  
  <ul>
  <li>If it runs on the server, does it have to run on a some kind of <code>webpack-*-server</code>?</li>
  <li>If it runs in the browser, how does it build module &lt;-> loader &lt;-> map? How is it sent to the browser?</li>
  </ul></li>
  </ul>