Static GitHub Issues

[762] How to set up proxy with nuxt.config.js

prev: Error in layouts with middleware
next: process.env.NODE_ENV getting set to development no matter what.
 dev: {
    env: require('./dev.env'),
    port: 8888,
    autoOpenBrowser: true,
    assetsSubDirectory: 'static',
    assetsPublicPath: '/',
    proxyTable: {
      '/api': {
        target: 'http://localhost:8080',
        changeOrigin: true,
        pathRewrite: {
          '^/api': ''
        }
      },
      '/local': {
        target: 'http://localhost:3000',
        changeOrigin: true,
        pathRewrite: {
          '^/local': ''
        }
      }
    }

thanks

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