1.1.2 • Published 3 years ago

umi-plugin-ark v1.1.2

Weekly downloads
-
License
-
Repository
-
Last release
3 years ago

umi-plugin-ark

umi插件,基于singleSpa,提供umi架构的子系统接入微前端基座的能力

安装

运行下面命令进行安装

npm install umi-plugin-ark -D

使用

下载即可,无需配置,只需在config/defaultSettings.js增加插件参数配置

插件参数

config/defaultSettings.js 中增加arkConfig属性配置,arkConfig有以下两个属性

  • 可写
  • 类型:object
键名类型可选默认值描述
rootComponentFunctionfalse-该函数需返回子应用根组件
rootIdStringfalse-子应用根节点id

补充说明:传入的rootComponent参数会处理后透传给singleSpaReact参数中的rootComponent,rootId则作为singleSpaReact中domElementGetter参数节点的id

例子:

// config/defaultSettings.js
export default {
    arkConfig: {
        rootComponent: () => require('../example/root.js').default,
        rootId: 'app-activity'
    },
};
1.1.2

3 years ago

1.1.0

3 years ago