Different baseURL for development and production with Nuxt.js
问题 How can I add a different baseURL for development and production? This is currently my nuxt.config.js module.exports = { mode: 'universal', ... axios: { // See https://github.com/nuxt-community/axios-module#options baseURL: 'http://10.8.0.1:8000', credentials: false }, ... } For npm run dev and npm run generate I would like to have different baseURL's. How can I do this? EDIT // nuxt.config.js export default { env: { baseUrl: process.env.BASE_URL || 'http://localhost:3000' } } console.log