本文介绍: 【代码】Uncaught TypeError: applicationxxxxxdied in status LOADING_SOURCE_CODE: Failed to fetch

配置跨域

    historyApiFallback: true,

    allowedHosts: ‘all’,

    headers: {

      ‘Access-Control-Allow-Origin‘: ‘*’

    }

  devServer: {
    open: true,
    host: 'localhost',
    port: 8081,
    hot: true,
    historyApiFallback: true,
    allowedHosts: 'all',
    headers: {
      'Access-Control-Allow-Origin': '*'
    },
    proxy: {
      '/api': {
        target: 'http://xxx.xxx.xxx.xxx:8082/',
        pathRewrite: {
          '^/api': ''
        },
        changeOrigin: true,
        secure: false
      }
    }
  },

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注