Open cedm opened 5 years ago
I'm having the same issue. Good to know that in the short term I can use min, thanks @cedm but I'd be interested in updating this whenever this is updated.
Package maintainer is not likely to show up anytime soon to push an update. No idea if that fix will even fix the problem. Ultimately, I think it comes down to that your trying to webpack an already packed file, which turns bad. At least, that's what we've seen in the past.
I've been meaning to get to forking the project, and maintaining, but I don't know when I will have the time to do that.
That commit may indeed not fix the issue. You're probably right when you say that the file gets double packed. Since I could get quagga to work by manually downloading it and placing it outside my packs folder, that's good enough for me already.
Just in case someone has the same issue, I can also load it via import Quagga from 'path/to/quagga'
, not just by using a <script>
tag. But I can't store the file inside my app/javascript/packs
folder and use NPM/Yarn to fetch it (I'm using Ruby On Rails).
I managed to bypass this problem with the following import:
import Quagga from 'quagga/dist/quagga';
Trying to use the NPM package (installed via
yarn add quagga
) with Webpack gives me the following error:_typeof is not defined
in the js console.If I bypass Webpack and link the quagga.min.js file directly (using ), everything works fine.
There must be something wrong with the NPM package. I noticed commit
4c73d7669277b0364fe23ce19cc1f981f1c685fa (Declare module so webpack can do its work)
might be the solution I'm looking for, but that is unreleased code sitting in the master branch, and not available on NPM.Any chance for a new release soon?