Search code examples
node.jselectronexev8electron-builder

How to pack v8 snapshot into exe using electron-builder?


I made custom v8 snapshot for my Electron app and put it into \node_modules\electron\dist and it's been working fine until I packed the app. I figured out that there's default v8_context_snapshot.bin in win-unpacked insted of mine.


Solution

  • Add afterPack hook into your build configuration. In that script you should copy your bin to unpacked (e.g. '\dist\win-unpacked\').