File tree Expand file tree Collapse file tree 3 files changed +24
-2
lines changed Expand file tree Collapse file tree 3 files changed +24
-2
lines changed Original file line number Diff line number Diff line change 1
1
VITE_DEBUG_REQUESTS = false
2
2
VITE_DEBUG_AGGRID = false
3
+ VITE_DEBUG_HOOK_RENDER = false
3
4
4
5
VITE_API_GATEWAY = /api/gateway
5
6
VITE_WS_GATEWAY = /ws/gateway
Original file line number Diff line number Diff line change 7
7
8
8
export function useDebugRender ( label : string ) {
9
9
// uncomment when you want the output in the console
10
- /* if (import.meta.env.DEV ) {
10
+ if ( import . meta. env . VITE_DEBUG_HOOK_RENDER ) {
11
11
label = `${ label } render` ;
12
12
console . count ?.( label ) ;
13
13
console . timeStamp ?.( label ) ;
14
- }*/
14
+ }
15
15
}
Original file line number Diff line number Diff line change 7
7
8
8
/// <reference types="vite-plugin-svgr/client" />
9
9
/// <reference types="vite/client" />
10
+
11
+ /* Don't know why but seem that TypeScript merge definitions of these two interfaces with existing ones.
12
+ * https://vitejs.dev/guide/env-and-mode#intellisense-for-typescript
13
+ */
14
+ import { UrlString } from '@gridsuite/commons-ui' ;
15
+
16
+ interface ImportMetaEnv {
17
+ /* From @gridsuite/commons-ui */
18
+ readonly VITE_API_GATEWAY : UrlString ;
19
+ readonly VITE_WS_GATEWAY : UrlString ;
20
+ // readonly VITE_DEBUG_REQUESTS?: boolean;
21
+
22
+ /* From this app */
23
+ readonly VITE_DEBUG_REQUESTS : boolean ;
24
+ readonly VITE_DEBUG_AGGRID : boolean ;
25
+ readonly VITE_DEBUG_HOOK_RENDER : boolean ;
26
+ }
27
+
28
+ interface ImportMeta {
29
+ readonly env : ImportMetaEnv ;
30
+ }
You can’t perform that action at this time.
0 commit comments