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.
tailchat/web/src/plugin/loader.ts

27 lines
547 B
TypeScript

import { initMiniStar, regDependency, regSharedModule } from 'mini-star';
/**
* 初始化插件
*/
export function initPlugins(): Promise<void> {
registerDependencies();
registerModules();
return initMiniStar({
plugins: [
{
name: 'com.msgbyte.webview',
url: '/plugins/com.msgbyte.webview/index.js',
},
],
});
}
function registerDependencies() {
regDependency('react', () => import('react'));
}
function registerModules() {
regSharedModule('@capital/common', () => import('./common/index'));
}