Skip to content

Commit

Permalink
feat(packages/react): Sentry错误监控
Browse files Browse the repository at this point in the history
Closes #22
  • Loading branch information
Mr-liu committed Jan 9, 2020
1 parent 4aadd64 commit b417e40
Show file tree
Hide file tree
Showing 4 changed files with 82 additions and 2 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
## [1.0.9](https://github.com/luoxue-victor/learn_webpack/compare/v1.2.12...v1.0.9) (2020-01-08)
## [1.0.9](https://github.com/luoxue-victor/learn_webpack/compare/v1.2.12...v1.0.9) (2020-01-09)

### 🌟 新功能
范围|描述|commitId
--|--|--
/ | 增加jest单元测试 | [9ecaee8](https://github.com/luoxue-victor/learn_webpack/commit/9ecaee8), closes [#9](https://github.com/luoxue-victor/learn_webpack/issues/9)


### 🚀 性能优化
范围|描述|commitId
--|--|--
/ | 更改jest单元测试配置 | [4aadd64](https://github.com/luoxue-victor/learn_webpack/commit/4aadd64)


### chore
范围|描述|commitId
--|--|--
Expand Down
63 changes: 63 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"@pkb/plugin-stylelint": "^1.2.10",
"@pkb/plugin-tslint": "^1.2.10",
"@pkb/webpack-box": "^1.2.11",
"@sentry/browser": "^5.11.0",
"babel-jest": "^24.9.0",
"commitizen": "^4.0.3",
"commitlint": "^8.2.0",
Expand Down
12 changes: 11 additions & 1 deletion packages/react/template/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
import React from 'react'
import ReactDom from 'react-dom'
import * as Sentry from '@sentry/browser';
import { App } from './demo'

ReactDom.render(<App/>, document.getElementById('app'))
/**
* 注册链接https://sentry.io/welcome/
* 生成一个DSN串。 DSN是链接我们要上报的项目和sentry服务端的钥匙。
* */
const dsn = '';
dsn && Sentry.init({
dsn
});

ReactDom.render(<App/>, document.getElementById('app'));

0 comments on commit b417e40

Please sign in to comment.