Skip to content

Commit

Permalink
chore: fix type errors
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Jan 9, 2025
1 parent ca56ffd commit 3b2c84c
Show file tree
Hide file tree
Showing 4 changed files with 232 additions and 271 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,14 @@
"taze": "catalog:",
"typescript": "catalog:",
"ua-parser-js": "catalog:",
"unimport": "^3.14.5",
"unimport": "catalog:",
"unocss": "catalog:",
"vite-hot-client": "catalog:",
"vue": "catalog:",
"vue-tsc": "catalog:"
},
"resolutions": {
"esbuild": "^0.23.1",
"esbuild": "catalog:",
"typescript": "catalog:",
"vite": "catalog:",
"vue-tsc": "catalog:"
Expand Down
10 changes: 1 addition & 9 deletions packages/devtools/src/integrations/vite-inspect.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,11 @@
import type { Plugin } from 'vite'
import type { ViteInspectAPI, Options as ViteInspectOptions } from 'vite-plugin-inspect'
import type { ViteInspectAPI, ViteInspectOptions } from 'vite-plugin-inspect'
import type { NuxtDevtoolsServerContext } from '../types'
import { addCustomTab } from '@nuxt/devtools-kit'
import { addVitePlugin } from '@nuxt/kit'

export async function createVitePluginInspect(options?: ViteInspectOptions): Promise<Plugin> {
// const { version } = await import('vite')
// const major = Number.parseInt(version.split('.')[0], 10)

// if (major < 6) {
// return await import('vite-plugin-inspect-legacy').then(r => r.default(options))
// }
// else {
return await import('vite-plugin-inspect').then(r => r.default(options))
// }
}

export async function setup({ nuxt, rpc }: NuxtDevtoolsServerContext) {
Expand Down
Loading

0 comments on commit 3b2c84c

Please sign in to comment.