rowboat/apps/x
Deepak Bhagat bcf354a4e2 fix: bundle pdf-parse, xlsx, papaparse, mammoth for packaged Electron app
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).
2026-04-21 20:39:07 +05:30
..
apps fix: bundle pdf-parse, xlsx, papaparse, mammoth for packaged Electron app 2026-04-21 20:39:07 +05:30
packages switch to claude as default 2026-04-13 21:28:01 +05:30
.gitignore bootstrap new electron app 2026-01-16 12:05:33 +05:30
eslint.config.mts ignore renderer eslint 2026-01-16 12:05:33 +05:30
package.json integrate electron forge 2026-01-17 10:28:44 +05:30
pnpm-lock.yaml add mermaid rendering 2026-04-10 18:00:30 +05:30
pnpm-workspace.yaml fix pnpm postinstall 2026-01-21 10:47:44 +05:30
tsconfig.base.json bootstrap new electron app 2026-01-16 12:05:33 +05:30