|
@@ -5,30 +5,31 @@ const app = createApp(App)
|
|
|
// 引入路由对象实例
|
|
|
import "ant-design-vue/dist/antd.css"; // or 'ant-design-vue/dist/antd.less'
|
|
|
import "@/assets/css/reset.css";
|
|
|
+import { message, Tooltip, Switch } from "ant-design-vue";
|
|
|
|
|
|
-// import * as Sentry from "@sentry/vue";
|
|
|
-// import { BrowserTracing } from "@sentry/tracing";
|
|
|
-
|
|
|
+import * as Sentry from "@sentry/vue";
|
|
|
+import { BrowserTracing } from "@sentry/tracing";
|
|
|
|
|
|
-// Sentry.init({
|
|
|
-// app,
|
|
|
-// dsn: "http://529fc1c357b248eda7473c119093f5db@sentry.denet.me/5",
|
|
|
-// integrations: [
|
|
|
-// new BrowserTracing({
|
|
|
-// tracingOrigins: ["localhost", "my-site-url.com", /^\//],
|
|
|
-// }),
|
|
|
-// ],
|
|
|
-// // Set tracesSampleRate to 1.0 to capture 100%
|
|
|
-// // of transactions for performance monitoring.
|
|
|
-// // We recommend adjusting this value in production
|
|
|
-// tracesSampleRate: 1.0,
|
|
|
-// });
|
|
|
+// if (process.env.NODE_ENV === 'production') {
|
|
|
+Sentry.init({
|
|
|
+ app,
|
|
|
+ dsn: "http://529fc1c357b248eda7473c119093f5db@sentry.denet.me/5",
|
|
|
+ integrations: [
|
|
|
+ new BrowserTracing({
|
|
|
+ tracingOrigins: ["localhost", "my-site-url.com", /^\//],
|
|
|
+ }),
|
|
|
+ ],
|
|
|
+ // Set tracesSampleRate to 1.0 to capture 100%
|
|
|
+ // of transactions for performance monitoring.
|
|
|
+ // We recommend adjusting this value in production
|
|
|
+ tracesSampleRate: 1.0,
|
|
|
+});
|
|
|
+// }
|
|
|
|
|
|
-import { message, Tooltip, Switch } from "ant-design-vue";
|
|
|
message.config({
|
|
|
- top: `10px`,
|
|
|
- duration: 3,
|
|
|
- maxCount: 1,
|
|
|
+ top: `10px`,
|
|
|
+ duration: 3,
|
|
|
+ maxCount: 1,
|
|
|
});
|
|
|
app.use(Tooltip);
|
|
|
app.use(Switch);
|