Files
nexusterm/electron.vite.config.ts
T
ylhan 430d78b9f0 NexusTerm: an SSH session manager for Linux
Connection tree with interleaved folders and hosts, tabbed terminals
grouped by host, a pinned local shell, TOFU host key verification, and
credentials held by the OS keyring.

Terminal bytes travel on a per-session MessagePort with credit-based flow
control, so one session running `cat` on a large file cannot stall the
others. Transports reconnect on their own with jittered backoff, keeping
the scrollback and the tab while replacing only the connection beneath.

156 tests, including integration tests against a real sshd and a
migration exercised against a database built in the old shape.
2026-09-17 03:12:24 +08:00

35 lines
981 B
TypeScript

import { resolve } from 'node:path'
import { defineConfig, externalizeDepsPlugin } from 'electron-vite'
import react from '@vitejs/plugin-react'
const sharedDir = resolve(__dirname, 'src/shared')
export default defineConfig({
main: {
// Externalizes everything in `dependencies` so native modules
// (better-sqlite3, and later node-pty / serialport) are `require`d from
// node_modules at runtime instead of being fed through a bundler that
// cannot load them. Getting this wrong produces runtime errors that look
// nothing like a config problem.
plugins: [externalizeDepsPlugin()],
resolve: {
alias: { '@shared': sharedDir },
},
},
preload: {
plugins: [externalizeDepsPlugin()],
resolve: {
alias: { '@shared': sharedDir },
},
},
renderer: {
plugins: [react()],
resolve: {
alias: {
'@shared': sharedDir,
'@renderer': resolve(__dirname, 'src/renderer/src'),
},
},
},
})