mirror of
https://github.com/ReVanced/revanced-bots.git
synced 2026-01-11 13:56:15 +00:00
fix(apis/websocket): don't bundle tesseract.js
This commit is contained in:
@@ -1,19 +0,0 @@
|
||||
diff --git a/src/worker/node/defaultOptions.js b/src/worker/node/defaultOptions.js
|
||||
index 053c1e3e3b561b2e5b5e3609e9c6b509b1661f11..407242f5576f8d888644ab28ff169599a79bf4dd 100644
|
||||
--- a/src/worker/node/defaultOptions.js
|
||||
+++ b/src/worker/node/defaultOptions.js
|
||||
@@ -1,10 +1,13 @@
|
||||
const path = require('path');
|
||||
+const fs = require('fs');
|
||||
const defaultOptions = require('../../constants/defaultOptions');
|
||||
|
||||
+const defaultPath = path.join(import.meta.dir, '..', '..', 'worker-script', 'node', 'index.js')
|
||||
+
|
||||
/*
|
||||
* Default options for node worker
|
||||
*/
|
||||
module.exports = {
|
||||
...defaultOptions,
|
||||
- workerPath: path.join(__dirname, '..', '..', 'worker-script', 'node', 'index.js'),
|
||||
+ workerPath: fs.existsSync(defaultPath) ? defaultPath : path.join(import.meta.dir, 'tesseract.js', 'src', 'worker-script', 'node', 'index.js'),
|
||||
};
|
||||
Reference in New Issue
Block a user