import { runApp , IAppConfig } from 'ice' ; import * as React from 'react' ; import { CompatibleAppConfig } from '@ice/stark/lib/AppRoute' ; import { ConfigProvider } from '@alifd/next' ; const appConfig = { app : { rootId : 'ice-container' , addProvider : ( { children } ) => { return < ConfigProvider prefix = "next-fd-" > { children } < /ConfigProvider>; } , } , router : { type : 'browser' , fallback : < div > 加载中 ... < /div> } , icestark : { type : 'framework' , getApps : async ( ) => { const apps = await new Promise ( ( resolve ) => { setTimeout ( ( ) => { const microConfig = [ { path : '/seller' , title : '商家平台' , url : [ 'https://iceworks.oss-cn-hangzhou.aliyuncs.com/icestark/child-seller-react/build/js/index.js' , 'https://iceworks.oss-cn-hangzhou.aliyuncs.com/icestark/child-seller-react/build/css/index.css' , ] , } , { path : '/waiter' , title : '小二平台' , url : [ 'https://iceworks.oss-cn-hangzhou.aliyuncs.com/icestark/child-waiter-vue/dist/js/app.js' , 'https://iceworks.oss-cn-hangzhou.aliyuncs.com/icestark/child-waiter-vue/dist/css/app.css' , ] , } , ] ; resolve ( microConfig ) ; } , 1000 ) ; } ) ; return apps ; } , removeRoutesLayout : true , } , } ; runApp ( appConfig ) ;