title: __dirname is not working in node js with webpack bundling
body: <p>My current directory is </p>
  
  <pre><code>D:\bkp\Programming\TestWorks\nodejs\testApp
  </code></pre>
  
  <p>but when i am using <code>__dirname</code> and trying to show a file with express server it gives me this error</p>
  
  <pre><code>Error: ENOENT: no such file or directory, stat 'D:\views\index.html'
  </code></pre>
  
  <p>my code for that is </p>
  
  <pre><code>res.sendFile(__dirname + 'views/index.html');
  </code></pre>
  
  <p>when i am bundling it with webpack and run the bundle file then this happens. Otherwise if i just run the normal app.js file it works fine. Help would be appreciated.</p>