mirror of
https://github.com/langgenius/dify.git
synced 2026-05-05 09:58:04 +08:00
chore: update vinext, add workaround (#32878)
This commit is contained in:
@ -1,21 +1,15 @@
|
||||
'use client'
|
||||
|
||||
import { lazy, Suspense } from 'react'
|
||||
import Script from 'next/script'
|
||||
import { IS_DEV } from '@/config'
|
||||
|
||||
const ReactScan = lazy(() =>
|
||||
import('./scan').then(module => ({
|
||||
default: module.ReactScan,
|
||||
})),
|
||||
)
|
||||
|
||||
export const ReactScanLoader = () => {
|
||||
export function ReactScanLoader() {
|
||||
if (!IS_DEV)
|
||||
return null
|
||||
|
||||
return (
|
||||
<Suspense fallback={null}>
|
||||
<ReactScan />
|
||||
</Suspense>
|
||||
<Script
|
||||
src="//unpkg.com/react-scan/dist/auto.global.js"
|
||||
crossOrigin="anonymous"
|
||||
strategy="beforeInteractive"
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user