Skip to content

Commit

Permalink
docs(add netily): add setting for build
Browse files Browse the repository at this point in the history
  • Loading branch information
innocces committed Aug 1, 2021
1 parent 585e18b commit e3be214
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
13 changes: 10 additions & 3 deletions .umirc.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { defineConfig } from 'dumi';

const isProd = process.env.NODE_ENV === 'production';
const specialItem = ['list-item', 'countdown-item', 'action-sheet-item'];
const specialItemMap = {
'action-sheet-item': 'action-sheet/body/item',
Expand Down Expand Up @@ -98,8 +99,14 @@ export default defineConfig({
// 更多 rule 配置访问 https://github.com/umijs/dumi/blob/master/packages/theme-mobile/src/typings/config.d.ts#L7
},
},
esbuild: {
target: 'es5',
},
...(isProd
? {
webpack5: {},
}
: {
esbuild: {
target: 'es5',
},
}),
// more config: https://d.umijs.org/config
});
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

# Taro-hooks

[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)[![NPM version][image-1]][1] [![NPM downloads][image-2]][2][![node][image-3]][2][![license][image-4]][2] [![Always ready-to-code.][image-5]][3] [![dumi][image-6]][4] [![][image-7]][5]
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)[![NPM version][image-1]][1] [![NPM downloads][image-2]][2][![node][image-3]][2][![license][image-4]][2] [![Always ready-to-code.][image-5]][3] [![dumi][image-6]][4] [![][image-7]][5][![Netlify Status][image-8]][6]

## 简介

Expand All @@ -13,6 +13,7 @@
## 文档

[传送门](https://innocces.github.io/taro-hooks)
[netlify](https://taro-hooks.netlify.app)

## 使用案例

Expand Down Expand Up @@ -92,10 +93,12 @@ $ yarn start
[3]: https://gitpod.io/#https://github.com/innocces/taro-hooks
[4]: https://github.com/umijs/dumi
[5]: https://codecov.io/gh/innocces/taro-hooks
[6]: https://app.netlify.com/sites/taro-hooks/deploys
[image-1]: https://img.shields.io/npm/v/taro-hooks.svg?style=flat
[image-2]: https://img.shields.io/npm/dm/taro-hooks.svg?style=flat
[image-3]: https://img.shields.io/node/v/taro-hooks.svg?style=flat-square
[image-4]: https://img.shields.io/npm/l/taro-hooks.svg?style=flat-square
[image-5]: https://img.shields.io/badge/Gitpod-ready--to--code-908a85?logo=gitpod
[image-6]: https://img.shields.io/badge/docs%20by-dumi-blue
[image-7]: https://codecov.io/gh/innocces/taro-hooks/branch/main/graph/badge.svg
[image-8]: https://api.netlify.com/api/v1/badges/287ea853-a0e4-4f3a-9733-2ed39ae34d12/deploy-status

1 comment on commit e3be214

@vercel
Copy link

@vercel vercel bot commented on e3be214 Aug 1, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.