mirror of
https://kevinblog.sytes.net/Code/Jibo-Revival-Group/JiboViteDocs.git
synced 2026-06-15 16:06:36 +00:00
22 lines
426 B
JavaScript
22 lines
426 B
JavaScript
import { Component, Fragment, options } from 'preact';
|
|
|
|
export function initDevTools() {
|
|
const globalVar =
|
|
typeof globalThis !== 'undefined'
|
|
? globalThis
|
|
: typeof window !== 'undefined'
|
|
? window
|
|
: undefined;
|
|
|
|
if (
|
|
globalVar !== null &&
|
|
globalVar !== undefined &&
|
|
globalVar.__PREACT_DEVTOOLS__
|
|
) {
|
|
globalVar.__PREACT_DEVTOOLS__.attachPreact('10.29.1', options, {
|
|
Fragment,
|
|
Component
|
|
});
|
|
}
|
|
}
|