title: How can I output multiple folders with webpack?
body: <p>I have a folder structure for my JS modules. I want one module per page. This is not a single page app.</p>
  
  <p>How can I output files in a folder structure?</p>
  
  <p>From what I can see, the only possibility is to output <code>[name].js</code>. This could work if I make the names very unique, or I could make the names have a <code>-</code> for a folder separator. That would mean <code>a/b/c.js</code> would translate to name <code>a-b-c</code>. I really don't like this. I would like to be able to <code>require("a/b/c")</code>.</p>
  
  <p>From what I can tell, I can't use a single bundled file either because <code>require</code> is not available outside of the module. If it was, I could just build a single bundle and <code>require("a/b/c")</code> on every page.</p>
  
  <p>If there is a good way to do this that I'm not finding on the internet, please let me know.</p>
  
  <p>It looks like I'm able to easily do this with require.js using r.js, but I don't want to use require.js and would like CommonJS modules.</p>