File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -76,6 +76,12 @@ export interface VitePluginInspectorOptions {
76
76
* @default false
77
77
*/
78
78
openInEditorHost ?: string | false
79
+
80
+ /**
81
+ * lazy load inspector times (ms)
82
+ * @default false
83
+ */
84
+ lazyLoad ?: number | false
79
85
}
80
86
81
87
const toggleComboKeysMap = {
@@ -101,6 +107,7 @@ export const DEFAULT_INSPECTOR_OPTIONS: VitePluginInspectorOptions = {
101
107
toggleButtonPos : 'top-right' ,
102
108
appendTo : '' ,
103
109
openInEditorHost : false ,
110
+ lazyLoad : false ,
104
111
} as const
105
112
106
113
function VitePluginInspector ( options : VitePluginInspectorOptions = DEFAULT_INSPECTOR_OPTIONS ) : PluginOption {
Original file line number Diff line number Diff line change @@ -37,4 +37,8 @@ function load() {
37
37
} ) . $mount ( `#${ CONTAINER_ID } ` )
38
38
}
39
39
40
- load ( )
40
+ if ( inspectorOptions . lazyLoad )
41
+ setTimeout ( load , inspectorOptions . lazyLoad )
42
+
43
+ else
44
+ load ( )
You can’t perform that action at this time.
0 commit comments