I'm trying to run Tesseract.js in a browser, so I'm using browserify to attempt to do so. I'm getting the error in the console
Uncaught SyntaxError: The requested module './bundle.js' does not provide an export named 'Tesseract'
Here's my test.html file
<!DOCTYPE html>
<html lang="en-US">
<head>
<script type="module" src="scripts/test.js"></script>
</head>
<body>
</body>
</html>
and here's my test.js file in the scripts folder as followed by the readme on https://github.com/naptha/tesseract.js
import {Tesseract} from './bundle.js';
Tesseract.recognize(
'https://tesseract.projectnaptha.com/img/eng_bw.png',
'eng',
{ logger: m => console.log(m) }
).then(({ data: { text } }) => {
console.log(text);
})
I looked into the bundle.js file and noticed there wasn't any mention of export Tesseract, I'm wondering if I was supposed to do something else with browserifying it maybe? I used the command
browserify tesseract.js/src/index.js -o bundle.js