Skip to content

Commit

Permalink
feat: experimental runtimeConfig support
Browse files Browse the repository at this point in the history
  • Loading branch information
pooya parsa committed Jun 3, 2020
1 parent 89b4dbf commit 07ca13c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,14 @@ const defu = require('defu')
const logger = consola.withScope('nuxt:axios')

function axiosModule (_moduleOptions) {
const { nuxt } = this

// Combine options
const moduleOptions = { ...this.options.axios, ..._moduleOptions }
const moduleOptions = {
...nuxt.options.axios,
..._moduleOptions,
...(nuxt.options.runtimeConfig && nuxt.options.runtimeConfig.axios)
}

// Default port
const defaultPort =
Expand Down

0 comments on commit 07ca13c

Please sign in to comment.