File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,11 @@ export function createServerRpc(
26
26
. serverMetrics || { }
27
27
} ,
28
28
async onModuleUpdated ( ) { } ,
29
+
30
+ async list ( ) {
31
+ const query = ctx . queryEnv ( { vite : 'vite1' , env : 'client' } )
32
+ return query . getModulesList ( )
33
+ } ,
29
34
}
30
35
31
36
return rpc
Original file line number Diff line number Diff line change @@ -108,6 +108,11 @@ export interface RpcFunctions {
108
108
getServerMetrics : ( query : QueryEnv ) => Promise < ServerMetrics >
109
109
resolveId : ( query : QueryEnv , id : string ) => Promise < string >
110
110
onModuleUpdated : ( ) => Promise < void >
111
+
112
+ /**
113
+ * @deprecated Query for the default Vite instance with the default env. Deprecated. Use `getModulesList` instead.
114
+ */
115
+ list : ( ) => Promise < ModulesList >
111
116
}
112
117
113
118
export interface QueryEnv {
You can’t perform that action at this time.
0 commit comments