mirror of
https://github.com/rowboatlabs/rowboat.git
synced 2026-04-25 00:16:29 +02:00
These four packages are loaded via _importDynamic (new Function pattern) in builtin-tools.ts to prevent esbuild from statically bundling pdfjs-dist's DOM polyfills into the Electron main process. As a result, esbuild cannot inline them into main.cjs, and they are not available at runtime in the packaged app. Two changes to fix this: 1. bundle.mjs: mark the four packages as esbuild external so the generated main.cjs emits require() calls for them rather than inlining them. 2. forge.config.cjs: after bundling, recursively collect all transitive and optional dependencies of the four packages from the pnpm store and copy them into .package/node_modules/. Optional deps are included because @napi-rs/canvas (required by pdfjs-dist for DOMMatrix polyfills) ships its native binaries as optional platform-specific packages. Fixes: pdf-parse, xlsx, papaparse, mammoth all fail with 'Cannot find package' in the packaged .app (issue #486). |
||
|---|---|---|
| .. | ||
| cli | ||
| docs | ||
| experimental | ||
| python-sdk | ||
| rowboat | ||
| rowboatx | ||
| x | ||