Skip to content

Commit 43e3670

Browse files
authored
refactor: use extendViteConfig in development (#554)
1 parent e1f3cc3 commit 43e3670

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/devtools.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { existsSync } from 'node:fs'
22
import type { Nuxt } from 'nuxt/schema'
33
import type { Resolver } from '@nuxt/kit'
4-
import { useNuxt } from '@nuxt/kit'
4+
import { extendViteConfig, useNuxt } from '@nuxt/kit'
55
import type { ModuleOptions } from './module'
66
import { DEVTOOLS_UI_LOCAL_PORT, DEVTOOLS_UI_ROUTE } from './constants'
77

@@ -21,7 +21,7 @@ export async function setupDevToolsUI(options: ModuleOptions, resolve: Resolver[
2121
}
2222
// In local development, start a separate Nuxt Server and proxy to serve the client
2323
else {
24-
nuxt.hook('vite:extendConfig', (config) => {
24+
extendViteConfig((config) => {
2525
config.server = config.server || {}
2626
config.server.proxy = config.server.proxy || {}
2727
config.server.proxy[DEVTOOLS_UI_ROUTE] = {

0 commit comments

Comments
 (0)