From 0276407b5b917ceda7b47685afc0dc6734500b59 Mon Sep 17 00:00:00 2001 From: alex8088 <244096523@qq.com> Date: Fri, 31 Oct 2025 01:16:02 +0800 Subject: [PATCH] refactor: deprecated `externalizeDepsPlugin` and `bytecodePlugin` --- src/plugins/bytecode.ts | 4 +++- src/plugins/externalizeDeps.ts | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/plugins/bytecode.ts b/src/plugins/bytecode.ts index 502959e..21c680b 100644 --- a/src/plugins/bytecode.ts +++ b/src/plugins/bytecode.ts @@ -150,7 +150,9 @@ export interface BytecodeOptions { } /** - * Compile to v8 bytecode to protect source code. + * Compile source code to v8 bytecode. + * + * @deprecated use `build.bytecode` config option instead */ export function bytecodePlugin(options: BytecodeOptions = {}): Plugin | null { if (process.env.NODE_ENV_ELECTRON_VITE !== 'production') { diff --git a/src/plugins/externalizeDeps.ts b/src/plugins/externalizeDeps.ts index e2b089b..076f244 100644 --- a/src/plugins/externalizeDeps.ts +++ b/src/plugins/externalizeDeps.ts @@ -7,7 +7,9 @@ export interface ExternalOptions { } /** - * Automatically externalize dependencies + * Automatically externalize dependencies. + * + * @deprecated use `build.externalizeDeps` config option instead */ export function externalizeDepsPlugin(options: ExternalOptions = {}): Plugin | null { const { exclude = [], include = [] } = options