Static GitHub Issues

[2292] process.env doesn't work in nuxt.config file?

prev: Transition on page reload
next: (question) Are there plans for a centralized logging facility?

Hi. I have this

sitemap: {
    path: '/sitemap.xml',
    hostname: 'http://mysite.com',
    cacheTime: 1000 * 60 * 15,
    generate: false, // Enable me when using nuxt generate
    exclude: [
      '/secret',
      '/admin/**'
    ],
    routes () {
      return axios.get(`${process.env.apiURL}/articles`)
        .then(res => res.data.map(article => '/crypto/' + article.slug))
    }
  },
  env: {
    apiURL: 'http://api.example.com'
  }

This one doesn't work, why? ${process.env.apiURL}/articles

<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c2005">#c2005</a>)</em></sub></div>