From 0a99f27127efba09ceff9a6fc63c84bd9c439aba Mon Sep 17 00:00:00 2001 From: afe1 <56245609+pzzyf@users.noreply.github.com> Date: Sun, 13 Oct 2024 10:01:18 +0800 Subject: [PATCH] chore: modify the type of the incoming function in the vite configuration (#4622) * fix: viteconfig funciont type error --------- Co-authored-by: afe1 --- internal/vite-config/src/typing.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/vite-config/src/typing.ts b/internal/vite-config/src/typing.ts index 69e9fd37..907a723e 100644 --- a/internal/vite-config/src/typing.ts +++ b/internal/vite-config/src/typing.ts @@ -139,12 +139,12 @@ type ApplicationOptions = ApplicationPluginOptions; type LibraryOptions = LibraryPluginOptions; -type DefineApplicationOptions = (config: ConfigEnv) => Promise<{ +type DefineApplicationOptions = (config?: ConfigEnv) => Promise<{ application?: ApplicationOptions; vite?: UserConfig; }>; -type DefineLibraryOptions = (config: ConfigEnv) => Promise<{ +type DefineLibraryOptions = (config?: ConfigEnv) => Promise<{ library?: LibraryOptions; vite?: UserConfig; }>;