Commit 1bfdb1be authored by 张子雨's avatar 张子雨

feat: 测试

parent fbad9667
......@@ -3,23 +3,31 @@ import * as Sentry from '@sentry/react';
import localStorage from '@/utils/localStorage';
// process.env.SENTRY_ENV !== 'test' 去掉测试环境不会报错
// if (process.env.NODE_ENV === 'production') {
try {
if (process.env.NODE_ENV === 'production') {
try {
Sentry.init({
dsn: 'http://b3f60c62e1234e26a5b851b9f26fba07@sentry.q-gp.com/34',
release: 'merchant-manage-ui@1.0.0',
maxBreadcrumbs: 50,
tracesSampleRate: 1,
beforeSend: e => {
const err = e.exception?.values || [];
// XXX 12-21 不上报[object Object]此类基础库异常
if (err.some(item => item.value.indexOf('“ResizeObserver') > -1)) {
return null;
}
return e;
},
});
Sentry.configureScope(scope => {
scope.setUser({
token: localStorage.get('token') || null,
});
});
} catch (e) {
} catch (e) {
console.log('Sentry无法加载', e);
}
}
// }
export const dva = {
config: {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment