title: Webpack 2 compiling but not running javascript
body: <p>I have 2 JS files</p>
  
  <p><strong>Index.js</strong></p>
  
  <pre><code>const sum = require('./app');
  
  const total = sum(10,5);
  
  console.log(total);
  </code></pre>
  
  <p><strong>app.js</strong></p>
  
  <pre><code>function sum(a,b){
    return a+b;
  }
  module.exports = sum;
  </code></pre>
  
  <p><strong>webpack config</strong></p>
  
  <pre><code>const path = require('path');
  
  const config ={
    entry:"./app/index.js",
    output:{
      path:path.resolve(__dirname,"app/build"),
      filename:'bundle.js'
    }
  }
  
  module.exports = config;
  </code></pre>
  
  <p>The bundle.js is getting generated , i have added the bundle to my index.html, the bundle also gets loaded when checking in network tab. But the <code>console.log(total)</code> is not working, nothing works.</p>