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