title: html5-qrcode webpack encore
body: <p>I try use <a href="https://github.com/mebjas/html5-qrcode" rel="nofollow noreferrer">https://github.com/mebjas/html5-qrcode</a>
  with webpack</p>
  <pre><code> npm i html5-qrcode --save
  
  
  + html5-qrcode@2.0.11
  added 2 packages from 2 contributors in 8.99s
  root@21ce69a5652
  </code></pre>
  <p>/application# yarn run encore dev --watch</p>
  <p>in js file</p>
  <pre><code>import(&quot;html5-qrcode&quot;);
  </code></pre>
  <p>compilation success but give console error</p>
  <pre><code>ncaught (in promise) TypeError: Cannot read property 'Html5Qrcode' of undefined
      at Object.&lt;anonymous&gt; (html5-qrcode.min.js:6)
      at Object../node_modules/html5-qrcode/dist/html5-qrcode.min.js (html5-qrcode.min.js:8)
      at __webpack_require__ (bootstrap:84)
      at __webpack_require__.t (bootstrap:182)
  
  
  require('html5-qrcode');
  </code></pre>
  <p>like import but error is</p>
  <pre><code>Uncaught TypeError: Cannot read property 'Html5Qrcode' of undefined
      at Object.&lt;anonymous&gt; (html5-qrcode.min.js:6)
      at Object../node_modules/html5-qrcode/dist/html5-qrcode.min.js (html5-qrcode.min.js:8)
      at __webpack_require__ (bootstrap:79)
      at Module../assets/components/ScannerQrCode.js (ScannerQrCode.js:6)
      at __webpack_require__ (bootstrap:79)
      at Module../assets/components/Games.js (app.js:374)
      at __webpack_require__ (bootstrap:79)
      at Module../assets/components/Home.js (app.js:748)
      at __webpack_require__ (bootstrap:79)
      at Module../assets/app.js (app.js:1)
  </code></pre>