I have cloned the repo, did pnpm i and when i run pnpm test:fully, i get following error,
vite v4.2.1 building for production... 4 modules transformed. out/main/bytecode-loader.js 2.28 kB out/main/foo2-ccaae97d.js 0.20 kB out/main/index.js 2.40 kB [vite:bytecode] Electron uninstall 0 bundles compiled into bytecode. built in 3.21s error during preview electron app: Error: Electron uninstall at Object.getElectronPath (E:\Temp Projects\electron-vite-bytecode-example\node_modules.pnpm\[email protected]_vite@4_55a6a0b3b133fa80ad49095012dd98d5\node_modules\electron-vite\dist\chunks\lib-8ec3e49a.js:60:19) .....
I havent changed anything in code, only just run the commands
Github link https://github.com/alex8088/electron-vite-bytecode-example
I have another electron-vite project based on react-ts. It build perfect, but when i add byteCodePlugin, i get the error. Else every thing work perfect. I m actually trying to do V8 bytecode protection.
import { resolve } from 'path'
import { defineConfig, bytecodePlugin, externalizeDepsPlugin } from 'electron-vite'
import vue from '@vitejs/plugin-vue'
export default defineConfig({
main: {
plugins: [externalizeDepsPlugin(), bytecodePlugin()]
},
preload: {
plugins: [externalizeDepsPlugin()]
},
renderer: {
resolve: {
alias: {
'@renderer': resolve('src/renderer/src')
}
},
plugins: [vue()]
}
})