Commit 4b2bd37
committed
fix: include sdpi-bridge.js in packaged app via extraResources
The electron-builder 'files' array only packaged dist/, electron/, and
package.json. public/bridge/sdpi-bridge.js was never copied into the
app bundle.
In the packaged app (app.isPackaged === true), main.cjs looks for the
bridge at process.resourcesPath/bridge/sdpi-bridge.js. Since the file
was absent, net.fetch() returned ERR_FILE_NOT_FOUND, sdpi-bridge.js
failed to load, and window.sdpi was undefined in the inspector iframe —
causing 'ReferenceError: sdpi is not defined' when clicking Save.
Fix: add extraResources entry so electron-builder copies the bridge into
resources/bridge/sdpi-bridge.js during packaging.1 parent a5753c6 commit 4b2bd37
1 file changed
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
39 | 45 | | |
40 | 46 | | |
41 | 47 | | |
| |||
0 commit comments