简体   繁体   English

如何使用电子生成器将 v8 快照打包到 exe 中?

[英]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.我为我的 Electron 应用程序制作了自定义 v8 快照,并将其放入\node_modules\electron\dist中,在我打包应用程序之前它一直运行良好。 I figured out that there's default v8_context_snapshot.bin in win-unpacked insted of mine.我发现我的win-unpacked v8_context_snapshot.bin中有默认的 v8_context_snapshot.bin 。

Add afterPack hook into your build configuration.afterPack挂钩添加到您的构建配置中。 In that script you should copy your bin to unpacked (eg '\dist\win-unpacked\' ).在该脚本中,您应该将您的 bin 复制到解压后(例如'\dist\win-unpacked\' )。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM