diff --git a/packages/insomnia/src/ui/index.tsx b/packages/insomnia/src/ui/index.tsx index 5aa3eff101f..2fe1eb3b231 100644 --- a/packages/insomnia/src/ui/index.tsx +++ b/packages/insomnia/src/ui/index.tsx @@ -1,5 +1,6 @@ import './rendererListeners'; +import { registerKongSpecRenderer } from '@kong/spec-renderer-dev/web-component'; import React, { lazy, Suspense } from 'react'; import ReactDOM from 'react-dom/client'; import { @@ -47,6 +48,8 @@ const Environments = lazy(() => import('./routes/environments')); initializeSentry(); initializeLogging(); +registerKongSpecRenderer(); + // Handy little helper document.body.setAttribute('data-platform', process.platform); document.title = getProductName(); diff --git a/packages/insomnia/src/ui/routes/design.tsx b/packages/insomnia/src/ui/routes/design.tsx index cb0baa1f1a0..cb190e49700 100644 --- a/packages/insomnia/src/ui/routes/design.tsx +++ b/packages/insomnia/src/ui/routes/design.tsx @@ -1,4 +1,3 @@ -import { registerKongSpecRenderer } from '@kong/spec-renderer-dev/web-component'; import { type IRuleResult } from '@stoplight/spectral-core'; import CodeMirror from 'codemirror'; import { stat } from 'fs/promises'; @@ -119,7 +118,7 @@ export const loader: LoaderFunction = async ({ parsedSpec, }; }; -registerKongSpecRenderer(); + const SwaggerUIDiv = ({ text }: { text: string }) => { const [spec, setSpec] = useState({}); useEffect(() => {