title: new WorkboxPlugin({ TypeError: WorkboxPlugin is not a constructor
body: <p><strong>I am Building a production package of Jhipster application using gradlew -Pprod command but getting following error</strong></p>
  
  <pre><code>D:\My Project\other\beequote\webpack\webpack.prod.js:89
          new WorkboxPlugin({
          ^
  
  TypeError: WorkboxPlugin is not a constructor
      at Object.&lt;anonymous&gt; (D:\My Project\other\beequote\webpack\webpack.prod.js:89:9)
      at Module._compile (module.js:635:30)
      at Object.Module._extensions..js (module.js:646:10)
      at Module.load (module.js:554:32)
      at tryModuleLoad (module.js:497:12)
      at Function.Module._load (module.js:489:3)
      at Module.require (module.js:579:17)
      at require (internal/module.js:11:18)
      at requireConfig (D:\My Project\other\beequote\node_modules\webpack\bin\convert-argv.js:97:18)
      at D:\My Project\other\beequote\node_modules\webpack\bin\convert-argv.js:104:17
      at Array.forEach (&lt;anonymous&gt;)
      at module.exports (D:\My Project\other\beequote\node_modules\webpack\bin\convert-argv.js:102:15)
      at yargs.parse (D:\My Project\other\beequote\node_modules\webpack\bin\webpack.js:171:41)
      at Object.Yargs.self.parse (D:\My Project\other\beequote\node_modules\webpack\node_modules\yargs\yargs.js:533:18)
      at Object.&lt;anonymous&gt; (D:\My Project\other\beequote\node_modules\webpack\bin\webpack.js:152:7)
      at Module._compile (module.js:635:30)
  </code></pre>
  
  <p><strong>Before getting above Error I was getting following error but after Upadate "workbox-webpack-plugin of with version 3.0.0-alpha.3 I solved following error using</strong> <a href="https://github.com/jhipster/generator-jhipster/pull/6950" rel="nofollow noreferrer">this solution</a></p>
  
  <pre><code>Error: workbox-sw is needed by the service worker and could not be copied over to your new site. Error: EPERM: operation not permitted, open 'C:\projects\jhipster-app\build\www\workbox-sw.prod.v2.1.2.js'
      at Promise.all.then.catch (C:\projects\jhipster-app\node_modules\workbox-build\build\lib\utils\copy-workbox-sw.js:17:13)
      at &lt;anonymous&gt;
  </code></pre>
  
  <p>Please help me so solve this error </p>