devServer: {
        contentBase: path.resolve(__dirname, "../dev"),
        compress: true,
        port: 9000,//本身的端口号
        host: 'localhost',
        proxy: {
            '/api': {
                target: 'http://localhost:3000',//代理到的地址
                changeOrigin: true
            }
        }
    }

 

相关文章:

  • 2021-08-08
猜你喜欢
  • 2021-07-24
  • 2022-01-07
  • 2021-07-05
  • 2021-11-28
  • 2021-10-23
  • 2021-09-13
  • 2021-04-18
相关资源
相似解决方案