umi-types
TypeScript icon, indicating that this package has built-in type declarations

0.5.14 • Public • Published

umi-types

Type definitions for umi.

NPM version Build Status NPM downloads

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

Dependents (22)

Package Sidebar

Install

npm i umi-types

Weekly Downloads

607

Version

0.5.14

License

MIT

Unpacked Size

34.7 kB

Total Files

8

Last publish

Collaborators

  • sorrycc
  • yutingzhao1991