mirror of https://github.com/sundowndev/http.git
feat: consola integration
parent
5367bd5620
commit
4ec3b5dd0f
|
@ -1,6 +1,8 @@
|
|||
const chalk = require('chalk')
|
||||
const path = require('path')
|
||||
const debug = require('debug')('nuxt:axios')
|
||||
const consola = require('consola')
|
||||
|
||||
const logger = consola.withScope('nuxt:axios')
|
||||
|
||||
module.exports = function nuxtAxios (_moduleOptions) {
|
||||
// Combine options
|
||||
|
@ -94,12 +96,8 @@ module.exports = function nuxtAxios (_moduleOptions) {
|
|||
// Set _AXIOS_BASE_URL_ for dynamic SSR baseURL
|
||||
process.env._AXIOS_BASE_URL_ = options.baseURL
|
||||
|
||||
/* eslint-disable no-console */
|
||||
debug(
|
||||
`BaseURL: ${chalk.green(options.baseURL)} (Browser: ${chalk.green(
|
||||
options.browserBaseURL
|
||||
)})`
|
||||
)
|
||||
logger.info(`BaseURL: ${chalk.green(options.baseURL)}`)
|
||||
logger.info(`BaseURL (Browser): ${chalk.green(options.browserBaseURL)}`)
|
||||
}
|
||||
|
||||
module.exports.meta = require('../package.json')
|
||||
|
|
16
package.json
16
package.json
|
@ -34,25 +34,25 @@
|
|||
]
|
||||
},
|
||||
"dependencies": {
|
||||
"@nuxtjs/proxy": "^1.1.4",
|
||||
"@nuxtjs/proxy": "^1.2.1",
|
||||
"axios": "^0.18.0",
|
||||
"axios-retry": "^3.0.2",
|
||||
"chalk": "^2.3.2",
|
||||
"debug": "^3.1.0"
|
||||
"consola": "^1.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"codecov": "latest",
|
||||
"eslint": "^4.17.0",
|
||||
"eslint-config-standard": "11.0.0",
|
||||
"eslint-plugin-import": "latest",
|
||||
"eslint-plugin-jest": "latest",
|
||||
"eslint-plugin-import": "^2.10.0",
|
||||
"eslint-plugin-jest": "^21.15.0",
|
||||
"eslint-plugin-node": "6.0.1",
|
||||
"eslint-plugin-promise": "latest",
|
||||
"eslint-plugin-promise": "^3.7.0",
|
||||
"eslint-plugin-standard": "latest",
|
||||
"eslint-plugin-vue": "latest",
|
||||
"jest": "latest",
|
||||
"eslint-plugin-vue": "^4.4.0",
|
||||
"jest": "^22.4.3",
|
||||
"jsdom": "^11.6.2",
|
||||
"nuxt": "^1.3.0",
|
||||
"nuxt-edge": "^2.0.0-25375287.923164e",
|
||||
"standard-version": "latest"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const { Nuxt, Builder } = require('nuxt')
|
||||
const { Nuxt, Builder } = require('nuxt-edge')
|
||||
const axios = require('axios')
|
||||
const config = require('./fixture/nuxt.config')
|
||||
|
||||
|
|
Loading…
Reference in New Issue