npm's personal messenger

    umi-single-spa-plugin

    0.0.2 • Public • Published

    umi-single-spa-plugin

    NPM version NPM downloads

    • 主应用是非umi, 基于single-spa
    • 子应用是umi框架

    umi-single-spa-plugin 注入到umi子应用中,控制子应用的render,并且导出single-spa需要的生命周期


    Install

    # or yarn
    $ npm install
    $ npm run build --watch
    $ npm run start

    Usage

    Configure in .umirc.js,

    export default {
      plugins: [
        ['umi-single-spa-plugin'],
      ],
      microConfig: {
        name: 'microchild' // 子应用的名字
      }
    }
    let isSubApp = true; // 是否在微应用
    export function modifyClientRenderOpts(memo) {
      return {
        ...memo,
        rootElement: isSubApp ? '' : memo.rootElement,    
      };
    }

    Options

    TODO

    LICENSE

    MIT

    Keywords

    none

    Install

    npm i umi-single-spa-plugin

    DownloadsWeekly Downloads

    4

    Version

    0.0.2

    License

    none

    Unpacked Size

    3.71 kB

    Total Files

    3

    Last publish

    Collaborators

    • xinzai