diff --git a/package.json b/package.json index 1cb57299..a72d2f55 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "private": true, "type": "module", "scripts": { - "dev:core": "pnpm --filter core sidecar dev", + "dev:core": "pnpm --filter core dev", "dev:website": "pnpm --filter spotlight-website dev", "dev:playground": "pnpm --filter spotlight-astro-playground dev", "build": "pnpm --filter=!spotlight-astro-playground -r run build", diff --git a/packages/astro/src/snippets.ts b/packages/astro/src/snippets.ts index d77b3b63..90f1d6d7 100644 --- a/packages/astro/src/snippets.ts +++ b/packages/astro/src/snippets.ts @@ -1,10 +1,11 @@ export const SPOTLIGHT_CLIENT_INIT = ` -import { init, sentry, console } from '@spotlightjs/astro'; +import { init, sentry, console, viteInspect } from '@spotlightjs/astro'; init({ integrations: [ sentry(), - console() + console(), + viteInspect() ], showTriggerButton: false, }); diff --git a/packages/core/src/index.tsx b/packages/core/src/index.tsx index 91bf4990..9f29ee8c 100644 --- a/packages/core/src/index.tsx +++ b/packages/core/src/index.tsx @@ -9,6 +9,7 @@ import { initIntegrations } from './integrations/integration.ts'; export { default as console } from './integrations/console/index.ts'; export { default as sentry } from './integrations/sentry/index.ts'; +export { default as viteInspect } from './integrations/vite-inspect/index.ts'; function createStyleSheet(styles: string) { const sheet = new CSSStyleSheet(); diff --git a/packages/core/src/integrations/vite-inspect/index.ts b/packages/core/src/integrations/vite-inspect/index.ts new file mode 100644 index 00000000..479ae090 --- /dev/null +++ b/packages/core/src/integrations/vite-inspect/index.ts @@ -0,0 +1,17 @@ +import type { Integration } from '../integration'; +import ViteInspect from './vite-inspect'; + +export default function consoleIntegration() { + return { + name: 'vite-inspect', + tabs: () => [ + { + id: 'vite-inspect', + title: 'Vite Inspect', + content: ViteInspect, + }, + ], + + setup: () => {}, + } satisfies Integration; +} diff --git a/packages/core/src/integrations/vite-inspect/vite-inspect.tsx b/packages/core/src/integrations/vite-inspect/vite-inspect.tsx new file mode 100644 index 00000000..4f7270df --- /dev/null +++ b/packages/core/src/integrations/vite-inspect/vite-inspect.tsx @@ -0,0 +1,9 @@ +export default function ViteInspect() { + return ( +
+
+