easysql/node_modules/vite-plugin-electron/dist/index.d.ts
2025-12-29 18:35:04 +08:00

39 lines
1.6 KiB
TypeScript

import { type Plugin } from 'vite';
import { resolveViteConfig, withExternalBuiltins } from './utils';
export { resolveViteConfig, withExternalBuiltins, };
export interface ElectronOptions {
/**
* Shortcut of `build.lib.entry`
*/
entry?: import('vite').LibraryOptions['entry'];
vite?: import('vite').InlineConfig;
/**
* Triggered when Vite is built every time -- `vite serve` command only.
*
* If this `onstart` is passed, Electron App will not start automatically.
* However, you can start Electroo App via `startup` function.
*/
onstart?: (args: {
/**
* Electron App startup function.
* It will mount the Electron App child-process to `process.electronApp`.
* @param argv default value `['.', '--no-sandbox']`
*/
startup: (argv?: string[]) => Promise<void>;
/** Reload Electron-Renderer */
reload: () => void;
}) => void | Promise<void>;
}
export declare function build(options: ElectronOptions): Promise<import("rollup").RollupOutput | import("rollup").RollupOutput[] | import("rollup").RollupWatcher>;
export default function electron(options: ElectronOptions | ElectronOptions[]): Plugin[];
/**
* Electron App startup function.
* It will mount the Electron App child-process to `process.electronApp`.
* @param argv default value `['.', '--no-sandbox']`
*/
export declare function startup(argv?: string[]): Promise<void>;
export declare namespace startup {
var hookedProcessExit: boolean;
var exit: () => Promise<null> | Promise<void | Error>;
}