File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 11import { fileURLToPath } from 'url'
2+ import { defu } from 'defu'
23import { addServerHandler , defineNuxtModule } from '@nuxt/kit'
34import { resolve } from 'pathe'
45import type { Options } from 'http-proxy-middleware'
@@ -20,7 +21,9 @@ export default defineNuxtModule<ModuleOptions>({
2021 const runtimeDir = fileURLToPath ( new URL ( './runtime' , import . meta. url ) )
2122 nuxt . options . build . transpile . push ( runtimeDir , '#proxy-handler' )
2223
23- const finalConfig = ( nuxt . options . runtimeConfig . proxy = nuxt . options . runtimeConfig . proxy || { options : options . options } ) as ModuleOptions
24+ const finalConfig = nuxt . options . runtimeConfig . proxy = defu ( nuxt . options . runtimeConfig . proxy , {
25+ options : options . options ,
26+ } )
2427
2528 function createProxyMiddleware ( options : Options , index ?: number ) {
2629 return `
You can’t perform that action at this time.
0 commit comments