title: webpack SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
body: <p>I've tried adding the npm package <a href="https://github.com/mzgoddard/hard-source-webpack-plugin" rel="nofollow noreferrer">hard-source-webpack-plugin</a> to my project. As written in the docs, I only should add</p>
  
  <pre><code>var HardSourceWebpackPlugin = require('hard-source-webpack-plugin');
  </code></pre>
  
  <p>When running webpack I got the following error:</p>
  
  <pre><code>D:\Projects\MyProject\node_modules\hard-source-webpack-plugin\index.js:49
  let ops = 0;
  ^^^
  SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
      at exports.runInThisContext (vm.js:53:16)
      at Module._compile (module.js:373:25)
      at Object.Module._extensions..js (module.js:404:10)
      at Module.load (module.js:343:32)
      at Function.Module._load (module.js:300:12)
      at Module.require (module.js:353:17)
      at require (internal/module.js:12:17)
      at Object.&lt;anonymous&gt; (D:\Projects\MyProject\webpack.config.js:6:31)
      at Module._compile (module.js:397:26)
      at Object.Module._extensions..js (module.js:404:10)
  Process terminated with code 1.
  </code></pre>
  
  <p>I've installed the latest <code>Node.js</code> which is currently version 10.5.0.</p>