You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
import { regDependency , regSharedModule } from 'mini-star' ;
import { pluginManager } from './manager' ;
/**
* 初始化插件
*/
export async function initPlugins ( ) : Promise < void > {
registerDependencies ( ) ;
registerModules ( ) ;
await pluginManager . initPlugins ( ) ;
}
function registerDependencies() {
regDependency ( 'react' , ( ) = > import ( 'react' ) ) ;
regDependency ( 'axios' , ( ) = > import ( 'axios' ) ) ; // 用于插件的第三方包使用axios作为依赖的情况下, 可以减少包体积
}
function registerModules() {
regSharedModule ( '@capital/common' , ( ) = > import ( './common/index' ) ) ;
regSharedModule ( '@capital/component' , ( ) = > import ( './component/index' ) ) ;
}