Skip to content

Commit 7918809

Browse files
committed
feat: allow runtime config overrides
1 parent 90a98cc commit 7918809

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/module.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@ function createProxyMiddleware(buildDir: string, filename: string, options: Opti
1212
write: true,
1313
getContents: () => dedent`
1414
import { createProxyMiddleware } from 'nuxt-proxy/middleware'
15+
import { useRuntimeConfig } from '#imports'
1516
16-
export default createProxyMiddleware(${JSON.stringify(options)})
17+
export default createProxyMiddleware(useRuntimeConfig().proxy.options)
1718
`,
1819
})
1920

0 commit comments

Comments
 (0)