Skip to content

Commit

Permalink
fix: 修复由于修改仓库名而丢失的链接
Browse files Browse the repository at this point in the history
  • Loading branch information
liu committed Jun 2, 2023
1 parent 168da24 commit ccb0cac
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# @ni-web-infra/common-utils
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2FNI-Web-Infra-Team%2Fcommon-utils.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2FNI-Web-Infra-Team%2Fcommon-utils?ref=badge_shield)


[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2FNI-Web-Infra-Team%2Fcommon-util.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2FNI-Web-Infra-Team%2Fcommon-util?ref=badge_shield)
公共工具类库

## 如何使用
Expand All @@ -10,7 +8,7 @@
$ npm install -S @ni-web-infra/common-utils
```

```js
```javascript
// 全量引入
import cnUtils from "@ni-web-infra/common-utils";
cnUtils.getBrowserInfo();
Expand Down Expand Up @@ -68,12 +66,15 @@ $ npm publish

如果是 html 文件引用 `index.es.js` 文件或者通过 npm 的方式引用时,vue2.6 相关工程环境中,如果出现下面类似问题 `Module parse failed: Unexpected token` ,解决方式如下

```js
```javascript
// 在vue.config.js文件中 transpileDependencies 参数增加需要显示转换的模块名称

// Babel 显式转译列表
transpileDependencies: ['/@ni-web-infra/common-utils/'],
{
// ...
transpileDependencies: ['/@ni-web-infra/common-utils/']
}
```

## License
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2FNI-Web-Infra-Team%2Fcommon-utils.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2FNI-Web-Infra-Team%2Fcommon-utils?ref=badge_large)
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2FNI-Web-Infra-Team%2Fcommon-util.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2FNI-Web-Infra-Team%2Fcommon-util?ref=badge_large)

0 comments on commit ccb0cac

Please sign in to comment.