refactor(web): organize devtools per tool

This commit is contained in:
yyh 2025-12-29 15:57:06 +08:00
parent 39ef88b50f
commit 04648fc99a
No known key found for this signature in database
7 changed files with 8 additions and 7 deletions

View File

@ -1,3 +1,3 @@
export { ReactScan } from './react-scan'
export { default as ReactScanLoader } from './react-scan-loader'
export { TanStackDevtoolsWrapper } from './tanstack-devtools'
export { ReactScanLoader } from './react-scan'
export { TanStackDevtoolsWrapper } from './tanstack'

View File

@ -0,0 +1,2 @@
export { ReactScanLoader } from './loader'
export { ReactScan } from './scan'

View File

@ -4,12 +4,12 @@ import { lazy, Suspense } from 'react'
import { IS_DEV } from '@/config'
const ReactScan = lazy(() =>
import('./react-scan').then(module => ({
import('./scan').then(module => ({
default: module.ReactScan,
})),
)
const ReactScanLoader = () => {
export const ReactScanLoader = () => {
if (!IS_DEV)
return null
@ -19,5 +19,3 @@ const ReactScanLoader = () => {
</Suspense>
)
}
export default ReactScanLoader

View File

@ -0,0 +1 @@
export { TanStackDevtoolsWrapper } from './devtools'

View File

@ -6,7 +6,7 @@ import { lazy, Suspense } from 'react'
import { IS_DEV } from '@/config'
const TanStackDevtoolsWrapper = lazy(() =>
import('@/app/components/devtools').then(module => ({
import('@/app/components/devtools/tanstack').then(module => ({
default: module.TanStackDevtoolsWrapper,
})),
)