css.ts
18 lines
| 455 B
| video/mp2t
|
TypeScriptLexer
cin
|
r36 | import inject from "./dom-inject"; | ||
interface OnLoad { | ||||
(result?: any): void; | ||||
error(err: any): void; | ||||
} | ||||
cin
|
r6 | |||
const plugin = { | ||||
cin
|
r36 | load: (id: string, require: Require, cb: OnLoad, config: { isBuild?: boolean }) => { | ||
cin
|
r53 | if (config && config.isBuild) { | ||
cin
|
r36 | cb(); | ||
} else { | ||||
const url = require.toUrl(id); | ||||
inject.injectStylesheet(url).then(() => cb({ url }), e => cb.error(e)); | ||||
cin
|
r6 | } | ||
} | ||||
}; | ||||
export = plugin; | ||||