chore(ocr): externalize tesseract.js completely

This commit is contained in:
Elian Doran
2026-04-05 22:20:38 +03:00
parent baa93cb371
commit 1e861d1125
3 changed files with 9 additions and 20 deletions

View File

@@ -14,8 +14,11 @@ async function main() {
build.copyNodeModules([ "better-sqlite3", "bindings", "file-uri-to-path" ]);
// Tesseract.js worker runs in a separate worker_thread and needs its
// source files (+ WASM core) on disk — they cannot be bundled.
build.copyNodeModules([ "tesseract.js", "tesseract.js-core", "wasm-feature-detect" ]);
// source files (+ WASM core + transitive deps) on disk — they cannot be bundled.
build.copyNodeModules([
"tesseract.js", "tesseract.js-core", "wasm-feature-detect",
"regenerator-runtime", "is-url", "bmp-js"
]);
build.copy("/node_modules/ckeditor5/dist/ckeditor5-content.css", "ckeditor5-content.css");
build.buildFrontend();