From 5653981f97526d966e309f6592aeda258c66880c Mon Sep 17 00:00:00 2001 From: YuanHuakk <1751826683@qq.com> Date: Tue, 21 Nov 2023 16:07:31 +0800 Subject: [PATCH] =?UTF-8?q?build(custom):=20=E8=B0=83=E6=95=B4=E7=9B=91?= =?UTF-8?q?=E6=8E=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 4 ++-- src/router/index.js | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index fa1d144..3e0c570 100644 --- a/package.json +++ b/package.json @@ -15,8 +15,8 @@ }, "lint-staged": { "*.{js,vue}": [ - "eslint --ext .js,.vue .", - "npx prettier --write --end-of-line lf ." + "npx prettier --write --end-of-line lf .", + "eslint --ext .js,.vue ." ] }, "config": { diff --git a/src/router/index.js b/src/router/index.js index f5cce34..92caa7a 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -15,12 +15,13 @@ export const router = createRouter({ export async function setupRouter(app) { await addDynamicRoutes() setupRouterGuard(router) + // if (import.meta.env.VITE_SENTRY) { Sentry.init({ app, dsn: 'https://adad4faa9b08aa08438ef33cba7962ab@w.huakk.top/6', integrations: [ new Sentry.BrowserTracing({ - tracePropagationTargets: ['localhost'], + tracePropagationTargets: ['localhost', /^https:\/\/w\.huakk\.top\/api/], routingInstrumentation: Sentry.vueRouterInstrumentation(router), }), new Sentry.Replay(), @@ -29,6 +30,7 @@ export async function setupRouter(app) { replaysSessionSampleRate: 0.1, replaysOnErrorSampleRate: 1.0, }) + // } app.use(router) }