0.5.14 • Published 1 month ago
@blorajs/umi-types v0.5.14
umi-types
(Forked from umi 2) Type definitions for umi.
Why
Installation
$ yarn add umi-types
Usage
import { IApi } from 'umi-types';
export default function(api: IApi) {
api.log.success('hello');
}
import { IApi, IModifyHTMLWithASTFunc } from 'umi-types';
export default function(api: IApi) {
const appendHead: IModifyHTMLWithASTFunc = ($, { route, getChunkPath }) => {
$('head').append(`<script src="${getChunkPath('a.js')}"></script>`);
};
api.modifyHTMLWithAST(appendHead);
}
LICENSE
MIT
0.5.14
1 month ago