wodax-umi-typesdeprecated

Type definitions for umi.

Usage no npm install needed!

<script type="module">
  import wodaxUmiTypes from 'https://cdn.skypack.dev/wodax-umi-types';
</script>

README

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