mirror of
https://github.com/nuxt/nuxt.git
synced 2025-03-09 03:03:18 +00:00
fix(kit): only call viteExtendConfig
callback once if possible (#5929)
This commit is contained in:
parent
78d4eabc41
commit
a54925f880
@ -99,6 +99,11 @@ export function extendViteConfig (
|
||||
return
|
||||
}
|
||||
|
||||
if (options.server !== false && options.client !== false) {
|
||||
// Call fn() only once
|
||||
return nuxt.hook('vite:extend', ({ config }) => fn(config))
|
||||
}
|
||||
|
||||
nuxt.hook('vite:extendConfig', (config, { isClient, isServer }) => {
|
||||
if (options.server !== false && isServer) {
|
||||
return fn(config)
|
||||
|
Loading…
Reference in New Issue
Block a user