mirror of
https://github.com/langgenius/dify.git
synced 2026-05-05 01:48:04 +08:00
chore: use react-grab to replace code-inspector-plugin (#33078)
This commit is contained in:
17
web/app/components/devtools/react-grab/loader.tsx
Normal file
17
web/app/components/devtools/react-grab/loader.tsx
Normal file
@ -0,0 +1,17 @@
|
||||
import Script from 'next/script'
|
||||
import { IS_DEV } from '@/config'
|
||||
|
||||
export function ReactGrabLoader() {
|
||||
if (!IS_DEV)
|
||||
return null
|
||||
|
||||
return (
|
||||
<>
|
||||
<Script
|
||||
src="//unpkg.com/react-grab/dist/index.global.js"
|
||||
crossOrigin="anonymous"
|
||||
strategy="beforeInteractive"
|
||||
/>
|
||||
</>
|
||||
)
|
||||
}
|
||||
@ -11,6 +11,7 @@ import { cn } from '@/utils/classnames'
|
||||
import { ToastProvider } from './components/base/toast'
|
||||
import { TooltipProvider } from './components/base/ui/tooltip'
|
||||
import BrowserInitializer from './components/browser-initializer'
|
||||
import { ReactGrabLoader } from './components/devtools/react-grab/loader'
|
||||
import { ReactScanLoader } from './components/devtools/react-scan/loader'
|
||||
import { I18nServerProvider } from './components/provider/i18n-server'
|
||||
import SentryInitializer from './components/sentry-initializer'
|
||||
@ -56,6 +57,7 @@ const LocaleLayout = async ({
|
||||
<meta name="msapplication-TileColor" content="#1C64F2" />
|
||||
<meta name="msapplication-config" content="/browserconfig.xml" />
|
||||
|
||||
<ReactGrabLoader />
|
||||
<ReactScanLoader />
|
||||
</head>
|
||||
<body
|
||||
|
||||
Reference in New Issue
Block a user