Uncaught TypeError: application ‘xxxxx‘ died in status LOADING_SOURCE_CODE: Failed to fetch

唐景山
2023-12-01

配置跨域:

    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
      }
    }
  },

 类似资料:

相关阅读

相关文章

相关问答