Static GitHub Issues

[2940] How to conditionally set variables in PROD and DEV?

prev: accessing attributes on the matched component
next: nuxt如何压缩静态站点资源的html代码

Hi there. What's the best way to have one url for prod and another for dev with Nuxt? I searched Docs but can't find anythng.

For example, I have this axios.post('http://localhost:7777/form', payload) Hot to change url when I run npm run build or npm run generate?

<!--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/c2551">#c2551</a>)</em></sub></div>