Skip to content

Commit 169cd6f

Browse files
authored
Merge pull request #10 from menthol/master
feat: allow runtime config overrides
2 parents 90a98cc + 7918809 commit 169cd6f

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)