Browse Source

chore: modify the type of the incoming function in the vite configuration (#4622)

* fix: viteconfig funciont type error

---------

Co-authored-by: afe1 <yunfei.zhu@nwowtec.com>
afe1 5 months ago
parent
commit
0a99f27127
1 changed files with 2 additions and 2 deletions
  1. 2 2
      internal/vite-config/src/typing.ts

+ 2 - 2
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;
 }>;