Skip to content

Commit 07ca13c

Browse files
author
pooya parsa
committedJun 3, 2020
feat: experimental runtimeConfig support
1 parent 89b4dbf commit 07ca13c

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed
 

‎lib/module.js

+7-1
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,14 @@ const defu = require('defu')
55
const logger = consola.withScope('nuxt:axios')
66

77
function axiosModule (_moduleOptions) {
8+
const { nuxt } = this
9+
810
// Combine options
9-
const moduleOptions = { ...this.options.axios, ..._moduleOptions }
11+
const moduleOptions = {
12+
...nuxt.options.axios,
13+
..._moduleOptions,
14+
...(nuxt.options.runtimeConfig && nuxt.options.runtimeConfig.axios)
15+
}
1016

1117
// Default port
1218
const defaultPort =

0 commit comments

Comments
 (0)
Please sign in to comment.