Skip to content

antd pro qiankun加载子应用报跨域错误 #669

@kevinpursuing

Description

@kevinpursuing

antd pro qiankun加载子应用报跨域错误

What happens?

antd pro 5主应用引用antd pro5子应用,页面一直loading

How To Reproduce

  1. 初始化APP1(antd pro 5),在config.ts中配置 ,内容如下
    qiankun: {
    master: {
    // 注册子应用信息
    apps: [
    {
    name: 'test', // 唯一 id
    entry: 'http://localhost:8001', // html entry
    },
    ],
    sandbox: { strictStyleIsolation: true, experimentalStyleIsolation: true },
    },
    },
    2.调整APP1路由
    {
    name: 'test',
    icon: 'table',
    path: '/test',
    microApp: 'test',
    },
  2. 初始化SUB_APP1在config.ts中配置 ,内容如下
    qiankun: {
    slave: {},
    }
  3. 在主应用渲染子应用,出现loading
    image
    image

image

  • qiankun Version:
    主应用:"@umijs/plugin-qiankun": "^2.27.0",
    子应用:"@umijs/plugin-qiankun": "^2.27.0",
  • Platform Version:
    主应用: "name": "ant-design-pro", "version": "5.0.0",
    子应用: "name": "ant-design-pro", "version": "5.0.0",
  • Browser Version:
    MAC chrome 版本 91.0.4472.164(正式版本) (x86_64)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions