UNPKG

@codelet/core

Version:
23 lines (22 loc) 584 B
import { definePlugin } from '../utils'; import { apiOverwrite } from './api-overwrite'; import { apiProxy } from './api-proxy'; import { promise } from './promise'; import { router } from './router'; export * from './api-overwrite'; export * from './api-proxy'; export * from './promise'; export * from './router'; // 插件 const plugins = { apiProxy, apiOverwrite, promise, router, }; // 启用全部插件 export default definePlugin((col, options) => { Object.entries(plugins).forEach(([key, plugin]) => { col.use(plugin, options?.[key]); }); });