nuxt-community / sitemap-module

Sitemap Module for Nuxt 2
https://sitemap.nuxtjs.org
MIT License
690 stars 128 forks source link

Can i use package "@nuxtjs/axios" instead of "axios"? #162

Closed arifikhsan closed 4 years ago

arifikhsan commented 4 years ago
// nuxt.config.js

const axios = require('axios')

{
  sitemap: {
    routes: async () => {
      const { data } = await axios.get('https://jsonplaceholder.typicode.com/users')
      return data.map((user) => `/users/${user.username}`)
    }
  }
}
NicoPennec commented 4 years ago

No you cannot.

See this related comment: nuxt-community/axios-module#242 (comment)

duplicate #25