Iddo Gino
f7162326e2
fix(dev): forward termination signals to Electron child
...
Spawn the Electron binary directly in dev/preview mode but forward
SIGINT/SIGTERM/SIGHUP from the electron-vite parent to the child,
matching Electron's own CLI wrapper (node_modules/electron/cli.js).
Without this, Ctrl-C sends SIGINT to the foreground process group once:
the Node parent exits immediately (no handler) and the Electron child
gets only a single SIGINT. On macOS, an Electron app whose before-quit
handler calls preventDefault() and later calls app.quit() can stall in
AppKit's event loop in that path. Under a direct 'electron .' launch
the CLI shim forwards SIGINT as well, so Electron gets it twice and
exits cleanly. Matching that behavior here fixes the hang.
Fixes #899
2026-04-20 16:33:34 -07:00
alex8088
31965d2972
perf: setup rollupOption compatibility via config factory
2026-04-18 01:03:04 +08:00
alex8088
4bede21c81
fix: remove useless preset config
2026-04-18 00:56:23 +08:00
alex8088
371b650d71
fix: chunk filename is wrong in ES mode
2026-04-12 16:24:56 +08:00
alex8088
5333d5216a
fix!: compatible with rollupOptions and rolldownOptions
2026-04-12 16:18:24 +08:00
alex8088
2765eea74d
refactor!: simplify resolve config and isolate user config for sub-builds
2026-04-12 02:58:42 +08:00
alex8088
a041f42e0b
fix(asset): isolate asset caches per environment
2026-04-09 22:30:27 +08:00
alex8088
2b7c4c33bc
fix: use the environment api in plugins
2026-04-09 21:51:42 +08:00
alex8088
517d703cbf
fix: skip TTY terminal manipulations in CI environments
2026-04-09 00:50:27 +08:00
alex8088
fa84b6d6c3
refactor: ?modulePath sub-build output strategy
2026-04-09 00:38:21 +08:00
alex8088
2f1f389776
fix(deps)!: update vite to v8 ( #894 )
2026-04-08 02:04:25 +08:00
alex8088
78a117d5be
perf: build compatibility target for Electron 40, 41
2026-03-21 14:36:18 +08:00
Michal Fudala
5a8bbe3d0e
fix(isolateEntries): handle non-TTY stdout in build reporter ( #887 )
...
The `clearLine` and `writeLine` helpers use TTY-only methods (`clearLine`, `cursorTo`,
`moveCursor`) without checking `process.stdout.isTTY`, causing builds to crash in
non-interactive environments like CI or piped output.
See error I got in my CI environment:
```
vite v7.3.1 building ssr environment for production...
✗ Build failed in 7ms
✓ 0 modules transformed.
✗ Build failed in 9ms
error during build:
[vite:isolate-entries] Could not load virtual:isolate-entries:
[vite:transform-reporter] process.stdout.clearLine is not a function
```
2026-02-16 22:25:35 +08:00
alex8088
438e9e7672
chore: fix jsdoc
2025-11-09 23:03:06 +08:00
alex8088
465690ab0d
refactor(config)!: remove function resolution for nested config fields
2025-10-31 23:28:40 +08:00
alex8088
6aae37833e
perf(buildReport): exclude node_modules from watch list
2025-10-31 21:59:15 +08:00
alex8088
9152dfc943
fix(modulePath): rewrite the build input instead of merging
2025-10-31 01:16:10 +08:00
alex8088
0276407b5b
refactor: deprecated externalizeDepsPlugin and bytecodePlugin
2025-10-31 01:16:02 +08:00
alex8088
fe7e631f47
refactor(config): move the isolateEntries options to the build option
2025-10-31 01:09:44 +08:00
alex8088
08be346407
feat(config): add build.externalizeDeps and build.bytecode config options to replace externalizeDepsPlugin and bytecodePlugin
2025-10-31 01:03:34 +08:00
alex8088
1bba6766e8
perf(isolateEntries): optimize entries transformation
2025-10-29 23:35:38 +08:00
alex8088
4edffe3b9a
perf(isolateEntries): transform log
2025-10-29 23:25:28 +08:00
alex8088
cfd9812a91
feat: reporter plugin for isolated builds
2025-10-29 22:32:35 +08:00
alex8088
7c7f31b2a3
fix: avoid duplicate chunk emission
2025-10-29 21:22:12 +08:00
alex8088
ae57b2489a
fix(asset): normalize imported public asset chunk path
2025-10-29 21:12:13 +08:00
alex8088
a4f7693712
perf: build compatibility target for Electron 39
2025-10-29 00:08:03 +08:00
alex8088
56fb519092
refactor: replace JSON.parse/stringify with manual deep clone
2025-10-28 23:18:45 +08:00
alex8088
eb0a7e3ffe
refactor(build): simplify build logic
2025-10-28 22:53:03 +08:00
alex8088
de70dfe1dc
refactor(config)!: restructure Electron Vite config interfaces
2025-10-28 22:36:25 +08:00
alex8088
8892bf3679
fix(modulePath): support watch mode
2025-10-28 21:50:54 +08:00
alex8088
2576484604
chore: improve logging message clarity and consistency
2025-10-28 21:50:47 +08:00
alex8088
88f6db2239
refactor: split electron plugin into preset and validator plugins
2025-10-28 21:50:12 +08:00
alex8088
0a79da03db
feat: add isolatedEntries option for preload and renderer to build entries as standalone bundles #154
2025-10-27 23:40:01 +08:00
alex8088
c3939ade45
refactor(asset): remove redundant path normalization
2025-10-24 23:57:12 +08:00
alex8088
38228f9b3f
fix(modulePath): prevent duplicate asset emission
2025-10-24 22:10:03 +08:00
alex8088
8b193864fd
feat: enhanced string protection
2025-10-20 23:35:21 +08:00
alex8088
5debb6f83b
refactor: remove Electron 18, 19, 20, 21 build compatilibity target
2025-10-19 16:00:01 +08:00
alex8088
d530597339
chore: rename the file esm to esmShim
2025-10-19 15:53:19 +08:00
alex8088
a9b5326544
perf(plugin): enhance path resolution using import.meta.dirname for ES modules
2025-10-19 15:47:35 +08:00
alex8088
7587d2c674
perf(bytecodePlugin): better way to count bytecode chunks
2025-10-19 14:49:09 +08:00
alex8088
0fb8918090
perf(plugin): lazily initialize MagicString and remove the redundant pre-check
2025-10-19 14:42:35 +08:00
alex8088
c7955aa6fd
perf(plugin): no need to cache sourcemap option
2025-10-19 12:11:29 +08:00
alex8088
70e027d38a
perf(plugin): more efficient module filtering via regular expressions
2025-10-19 11:57:23 +08:00
alex8088
28bb22b353
refactor(modulePath): better support for tree-shaking and code-splitting
2025-10-18 17:10:04 +08:00
alex8088
327adc23df
refactor(bytecodePlugin): improved bytecode bundle generation and made a new string protection plugin
2025-10-18 16:33:49 +08:00
alex8088
0badfc493f
chore: update eslint config
2025-10-17 21:28:47 +08:00
alex8088
b55eb725c4
perf: build compatibility target for Electron 38
2025-09-21 16:52:57 +08:00
alex8088
cbee52c8bb
perf: build compatibility target for Electron 37
2025-06-28 13:12:31 +08:00
alex8088
48e6f4f570
fix(deps)!: update Vite to v7 and remove cjs build
2025-06-28 13:08:38 +08:00
alex8088
4071778f07
fix: use import type for type-only imports
2025-06-28 00:01:48 +08:00