mirror of
https://github.com/zadam/trilium.git
synced 2026-05-06 12:07:27 +02:00
fix(desktop): tesseract.js not copied
This commit is contained in:
@@ -12,13 +12,6 @@ async function main() {
|
||||
|
||||
// Copy node modules dependencies
|
||||
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 + 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();
|
||||
|
||||
@@ -68,6 +68,14 @@ export default class BuildHelper {
|
||||
minify: true
|
||||
});
|
||||
writeFileSync(join(this.outDir, "meta.json"), JSON.stringify(result.metafile));
|
||||
|
||||
// Tesseract.js is marked as external above because its worker runs in
|
||||
// a separate worker_thread. Copy the worker source, WASM core and all
|
||||
// transitive runtime deps so they are available in dist/node_modules.
|
||||
this.copyNodeModules([
|
||||
"tesseract.js", "tesseract.js-core", "wasm-feature-detect",
|
||||
"regenerator-runtime", "is-url", "bmp-js"
|
||||
]);
|
||||
}
|
||||
|
||||
buildFrontend() {
|
||||
|
||||
Reference in New Issue
Block a user