Skip to content

feat: support custom Electron package name - #867

Open
SammySergi wants to merge 1 commit into
alex8088:masterfrom
SammySergi:feat/custom-electron-fork
Open

feat: support custom Electron package name#867
SammySergi wants to merge 1 commit into
alex8088:masterfrom
SammySergi:feat/custom-electron-fork

Conversation

@SammySergi

Copy link
Copy Markdown

Description

This PR allows the use of a custom package name to substitute the default electron package that is invoked. Several forks of Electron, including Overwolf's custom one, change the package identifier therefor not working out of the box with this plugin. Instead of invoking electron, I wish to invoke @overwolf/ow-electron.

This concept was also implemented on a previous vite-based electron tooling I used: electron-vite/vite-plugin-electron#229

Additional context

N/A


What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

Before submitting the PR, please make sure you do the following

@alex8088

Copy link
Copy Markdown
Owner

I think a better way is

npm install electron@npm:@overwolf/ow-electron -D

@SammySergi

SammySergi commented Dec 24, 2025

Copy link
Copy Markdown
Author

I think a better way is

npm install electron@npm:@overwolf/ow-electron -D

It doesn't quite work like that because you have to have both electron and @overwolf/ow-electron to work since their fork is proprietary and isnt open-source. We use the electron-vite/vite-plugin-electron version in production with no issues and have tested this PR too.

@SammySergi

Copy link
Copy Markdown
Author

I've also published it here if you would like to try it out: https://www.npmjs.com/package/@thatkawaiisam/electron-vite

kitschpatrol pushed a commit to kitschpatrol/electron-vite that referenced this pull request Jul 16, 2026
Fork release as @desirecore/electron-vite (v6.0.0-beta.2). Fixes a batch
of Vite 8 / Rolldown regressions and Electron 42 support, and merges
several long-pending upstream fixes.

- fix(esmShim): AST-based CJS shim injection at offset 0, no longer
  corrupts large Vite 8/Rolldown ESM bundles (alex8088#906)
- fix(swc): also set `oxc: false` to disable Vite 8 default transform (alex8088#916)
- fix(config): do not throw on non-plain objects when isolating config (alex8088#902)
- fix(renderer): re-root when HTML entry is outside root, avoid illegal
  `../` emit paths under Rolldown (alex8088#915)
- fix(bytecode): compile via vm.compileFunction in the consuming process
  type, fixing cachedDataRejected on Electron 42 / V8 14.8 (alex8088#911, alex8088#912)
- fix(bytecode): remove non-deterministic compile race (alex8088#910)
- fix(bytecode): correct renderer preset plugin name; locate the compiler
  script relative to this module so it survives package renames
- fix(modulePath): inject modulePathPlugin into the sub-build for nested
  `?modulePath` and re-exports (alex8088#860, alex8088#862)
- fix(dev): forward signals to the Electron child and escalate to SIGKILL
  on restart, fixing zombie processes (alex8088#899, alex8088#734, alex8088#353)
- feat: support Electron 42 targets and lazy electron install (alex8088#904)
- feat(bytecode): allow RegExp for chunkAlias; protect string concat (alex8088#885)
- feat(cli): add --noElectronStart (alex8088#578) and --electronPackage (alex8088#867)
- feat: export workerPlugin (alex8088#480)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants