build-plugin-icestark
TypeScript icon, indicating that this package has built-in type declarations

2.5.3 • Public • Published

plugin-icestark

Easy use icestark in icejs.

Usage

Framework Application

Through appConfig configuration of your framework application.

const appConfig = {
  ...
  icestark: {
    type: 'framework',
    getApps: () => {
      return [{
        path: '/seller',
        title: '商家平台',
        url: [
          '//ice.alicdn.com/icestark/child-seller-react/index.js',
          '//ice.alicdn.com/icestark/child-seller-react/index.css',
        ],
      }];
    },
  },
};

Options:

  • type: config framework to enable Framework application
  • getApps: get sub-application information, support async function
  • appRouter
    • ErrorComponent: error component
    • LoadingComponent: loading component
    • NotFoundComponent: 404 not found component
    • shouldAssetsRemove
  • removeRoutesLayout: remove global Layout when config true
  • AppRoute: custom AppRoute component
  • Layout: specify Framework application Layout, use layouts/index as default if exisit

Sub-application

modify appConfig:

// app.ts
const appConfig = {
  ...
  icestark: {
    type: 'child',
  },
};

Options:

  • type: config child to enable Sub-application

Readme

Keywords

none

Package Sidebar

Install

npm i build-plugin-icestark

Weekly Downloads

225

Version

2.5.3

License

MIT

Unpacked Size

84.2 kB

Total Files

36

Last publish

Collaborators

  • sobear
  • clarkxia
  • maoxiaoke
  • chenbin93
  • solojiang
  • luhengchang228
  • rax-publisher