title: Html-Webpack-Plugin very slow on multiple pug file
body: <p>I have a project that use webpack as bundler and webpack-dev-server during my development process. I use Html-webpack-plugin the compile my 30 pug file into html but when used with webpack-dev-server, recompile time is very long, maybe 5mn. Seems that webpack compile all my pug file instead of compiling just the file that I have changed. </p>
  
  <p>Here is a snipet on how I generate html file</p>
  
  <pre class="lang-js prettyprint-override"><code>   import HtmlWebpackPlugin from 'html-webpack-plugin';
     import path from 'path';
     import fs from 'fs';
  
     export const renderHtml = (programs) =&gt; {
      const fileList = [];
      fs.readdirSync(path.join(__dirname, `../programs/${programs}/pug/`)).forEach(file =&gt; {
          if (/\.pug$/.test(file)) {
              const name = `${file}`.replace('.pug', '');
              fileList.push({
                  name,
                  file
              });
          }
      });
      return fileList.map(file =&gt; {
          return new HtmlWebpackPlugin({
              filename: file.name + '.html',
              template: path.join(__dirname, `../programs/${programs}/pug/${file.file}`)
          });
      });
     };
  
     export default renderHtml;
  </code></pre>
  
  <p>And I use it like this in my webpack.config.babel.js file</p>
  
  <pre class="lang-js prettyprint-override"><code>plugins: [
          ...
          new VueLoaderPlugin(),
          ...renderHtml(programs)
      ]
  </code></pre>