Open kunjee17 opened 3 years ago
Same issue here.
Same issue here since the release of @zxing/browser Version 0.0.9. Worked fine with 0.0.8.
Hello there!
For me, the issue occurs because the loaders mismatching. I was using cjs
but @zxing/browser
was importing library
using esm
. I hope it helps to solve the issue globally. I solved that issue adding aliases to webpack.config.js
:
resolve: {
alias: {
'@zxing/library': '@zxing/library/cjs/index',
'@zxing/browser': '@zxing/browser/cjs/index',
},
},
I am trying to use zxing library with react (browser).
Below code is working
But if I change to the import from
@zxing/browser
it stops workingHere is the error.
Don't have any idea what I am missing here.
I was trying to use
BrowserMultiFormatReader
fromlibrary
for decode from video. Where things are working all good other thanreset
method. Then while going through issues I found out that, for using inside the browser, it would be good to use wrapper package@zxing/browser
and it just stops working. Neither video works nor image decode. All breaks with above code.