build-plugin-icestark
v2.5.6
Published
Easy use `icestark` in icejs.
Downloads
232
Keywords
Readme
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 applicationgetApps
: get sub-application information, support async functionappRouter
ErrorComponent
: error componentLoadingComponent
: loading componentNotFoundComponent
: 404 not found componentshouldAssetsRemove
removeRoutesLayout
: remove global Layout when configtrue
AppRoute
: custom AppRoute componentLayout
: specify Framework application Layout, uselayouts/index
as default if exisit
Sub-application
modify appConfig
:
// app.ts
const appConfig = {
...
icestark: {
type: 'child',
},
};
Options:
type
: configchild
to enable Sub-application