tesseract.js
tesseract.js copied to clipboard
ng build fails from Terser: Unexpected token: punc())
Describe the bug While maintaining an ionic 4 application that uses Angular 7 and this plugin, the ng production builds began failing to compile with this error from Terser of 'Unexpected token: punc())'. While tracking down what was causing the error it appears it is related to dangling commas found in /worker/browser/loadImage.js
I was updating tesseract.js from 2.1.1 to 2.1.5 when I encountered this build error with tesseract.js
Will follow up with a PR of what I updated locally in order to fix this issue.
Thanks for flagging this. The code you identified ended up being problematic for additional reasons, so has been removed entirely in the master branch and version 3. Feel free to reopen the issue if you encounter any syntax issues in the current version.