You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using vite-plugin-electron in my Electron project. I'm trying to obfuscate my code using the bytecodePlugin. However, since it's originally an electron-vite plugin, I'm unsure if it works for encryption as a plugin this way and if there are additional steps I need to take. Thanks in advance!
import { defineConfig } from 'vite';
import electron, { onstart, } from 'vite-plugin-electron';
import { bytecodePlugin } from 'electron-vite'
export default defineConfig({
plugins: [
solidPlugin(),
electron({
main: {
entry: 'electron/main/index.ts',
vite: {
build: {
// For Debug
sourcemap: true,
outDir: 'dist/electron/main',
},
// Will start Electron via VSCode Debug
plugins: [process.env.VSCODE_DEBUG ? onstart() : null, bytecodePlugin()],
},
},
preload: {
input: {
// You can configure multiple preload here
index: path.join(__dirname, 'electron/preload/index.ts'),
},
vite: {
build: {
// For Debug
sourcemap: 'inline',
outDir: 'dist/electron/preload',
},
plugins: [bytecodePlugin()],
},
},
// Enables use of Node.js API in the Renderer-process
// https://github.com/electron-vite/vite-plugin-electron/tree/main/packages/electron-renderer#electron-renderervite-serve
renderer: {},
}),
],
server: process.env.VSCODE_DEBUG
? {
host: pkg.debug.env.VITE_DEV_SERVER_HOSTNAME,
port: pkg.debug.env.VITE_DEV_SERVER_PORT,
}
: undefined,
build: {
// Copy assets to build output directory
},
});
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm using vite-plugin-electron in my Electron project. I'm trying to obfuscate my code using the bytecodePlugin. However, since it's originally an electron-vite plugin, I'm unsure if it works for encryption as a plugin this way and if there are additional steps I need to take. Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions