import inject from "./dom-inject"; interface OnLoad { (result?: any): void; error(err: any): void; } const plugin = { load: (id: string, require: Require, cb: OnLoad, config: { isBuild?: boolean }) => { if (config.isBuild) { cb(); } else { const url = require.toUrl(id); inject.injectStylesheet(url).then(() => cb({ url }), e => cb.error(e)); } } }; export = plugin;