From 677f639381ebfd816e3c2cfe02eb0f3b9f4be1bd Mon Sep 17 00:00:00 2001 From: SunWuyuan <1847261658@qq.com> Date: Sat, 31 Aug 2024 09:58:39 +0800 Subject: [PATCH] 1 --- .gitignore | 2 ++ package.json | 1 + pnpm-lock.yaml | 40 ++++++++++++++++++++++++++++++++++++++++ src/main.js | 4 ++++ 4 files changed, 47 insertions(+) diff --git a/.gitignore b/.gitignore index 997223d..1626a06 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,5 @@ pnpm-debug.log* *.njsproj *.sln *.sw? + +.vercel diff --git a/package.json b/package.json index 8802111..d970746 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ "@highlightjs/vue-plugin": "^2.1.0", "@mdi/font": "7.4.47", "@primevue/themes": "^4.0.0", + "@vercel/speed-insights": "^1.0.12", "@waline/client": "^3.3.0", "axios": "^1.7.2", "core-js": "^3.37.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 15aeef2..e68fb9a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -17,6 +17,9 @@ importers: '@primevue/themes': specifier: ^4.0.0 version: 4.0.0(@primeuix/styled@0.0.5) + '@vercel/speed-insights': + specifier: ^1.0.12 + version: 1.0.12(vue-router@4.4.0(vue@3.4.31))(vue@3.4.31) '@waline/client': specifier: ^3.3.0 version: 3.3.0 @@ -444,46 +447,55 @@ packages: resolution: {integrity: sha512-P9bSiAUnSSM7EmyRK+e5wgpqai86QOSv8BwvkGjLwYuOpaeomiZWifEos517CwbG+aZl1T4clSE1YqqH2JRs+g==} cpu: [arm] os: [linux] + libc: [glibc] '@rollup/rollup-linux-arm-musleabihf@4.18.1': resolution: {integrity: sha512-5RnjpACoxtS+aWOI1dURKno11d7krfpGDEn19jI8BuWmSBbUC4ytIADfROM1FZrFhQPSoP+KEa3NlEScznBTyQ==} cpu: [arm] os: [linux] + libc: [musl] '@rollup/rollup-linux-arm64-gnu@4.18.1': resolution: {integrity: sha512-8mwmGD668m8WaGbthrEYZ9CBmPug2QPGWxhJxh/vCgBjro5o96gL04WLlg5BA233OCWLqERy4YUzX3bJGXaJgQ==} cpu: [arm64] os: [linux] + libc: [glibc] '@rollup/rollup-linux-arm64-musl@4.18.1': resolution: {integrity: sha512-dJX9u4r4bqInMGOAQoGYdwDP8lQiisWb9et+T84l2WXk41yEej8v2iGKodmdKimT8cTAYt0jFb+UEBxnPkbXEQ==} cpu: [arm64] os: [linux] + libc: [musl] '@rollup/rollup-linux-powerpc64le-gnu@4.18.1': resolution: {integrity: sha512-V72cXdTl4EI0x6FNmho4D502sy7ed+LuVW6Ym8aI6DRQ9hQZdp5sj0a2usYOlqvFBNKQnLQGwmYnujo2HvjCxQ==} cpu: [ppc64] os: [linux] + libc: [glibc] '@rollup/rollup-linux-riscv64-gnu@4.18.1': resolution: {integrity: sha512-f+pJih7sxoKmbjghrM2RkWo2WHUW8UbfxIQiWo5yeCaCM0TveMEuAzKJte4QskBp1TIinpnRcxkquY+4WuY/tg==} cpu: [riscv64] os: [linux] + libc: [glibc] '@rollup/rollup-linux-s390x-gnu@4.18.1': resolution: {integrity: sha512-qb1hMMT3Fr/Qz1OKovCuUM11MUNLUuHeBC2DPPAWUYYUAOFWaxInaTwTQmc7Fl5La7DShTEpmYwgdt2hG+4TEg==} cpu: [s390x] os: [linux] + libc: [glibc] '@rollup/rollup-linux-x64-gnu@4.18.1': resolution: {integrity: sha512-7O5u/p6oKUFYjRbZkL2FLbwsyoJAjyeXHCU3O4ndvzg2OFO2GinFPSJFGbiwFDaCFc+k7gs9CF243PwdPQFh5g==} cpu: [x64] os: [linux] + libc: [glibc] '@rollup/rollup-linux-x64-musl@4.18.1': resolution: {integrity: sha512-pDLkYITdYrH/9Cv/Vlj8HppDuLMDUBmgsM0+N+xLtFd18aXgM9Nyqupb/Uw+HeidhfYg2lD6CXvz6CjoVOaKjQ==} cpu: [x64] os: [linux] + libc: [musl] '@rollup/rollup-win32-arm64-msvc@4.18.1': resolution: {integrity: sha512-W2ZNI323O/8pJdBGil1oCauuCzmVd9lDmWBBqxYZcOqWD6aWqJtVBQ1dFrF4dYpZPks6F+xCZHfzG5hYlSHZ6g==} @@ -524,6 +536,29 @@ packages: '@ungap/structured-clone@1.2.0': resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} + '@vercel/speed-insights@1.0.12': + resolution: {integrity: sha512-ZGQ+a7bcfWJD2VYEp2R1LHvRAMyyaFBYytZXsfnbOMkeOvzGNVxUL7aVUvisIrTZjXTSsxG45DKX7yiw6nq2Jw==} + peerDependencies: + '@sveltejs/kit': ^1 || ^2 + next: '>= 13' + react: ^18 || ^19 + svelte: ^4 + vue: ^3 + vue-router: ^4 + peerDependenciesMeta: + '@sveltejs/kit': + optional: true + next: + optional: true + react: + optional: true + svelte: + optional: true + vue: + optional: true + vue-router: + optional: true + '@vitejs/plugin-vue@5.0.5': resolution: {integrity: sha512-LOjm7XeIimLBZyzinBQ6OSm3UBCNVCpLkxGC0oWmm2YPzVZoxMsdvNVimLTBzpAnR9hl/yn1SHGuRfe6/Td9rQ==} engines: {node: ^18.0.0 || >=20.0.0} @@ -2257,6 +2292,11 @@ snapshots: '@ungap/structured-clone@1.2.0': {} + '@vercel/speed-insights@1.0.12(vue-router@4.4.0(vue@3.4.31))(vue@3.4.31)': + optionalDependencies: + vue: 3.4.31 + vue-router: 4.4.0(vue@3.4.31) + '@vitejs/plugin-vue@5.0.5(vite@5.3.3(@types/node@20.14.12)(sass@1.77.6))(vue@3.4.31)': dependencies: vite: 5.3.3(@types/node@20.14.12)(sass@1.77.6) diff --git a/src/main.js b/src/main.js index adc9465..4e8a02a 100644 --- a/src/main.js +++ b/src/main.js @@ -24,5 +24,9 @@ app.use(PrimeVue, { }); app.use(ToastService); +// 使用 Vercel Speed Insights 观测网站性能 +import { injectSpeedInsights } from '@vercel/speed-insights'; +injectSpeedInsights(); + registerPlugins(app); app.mount("#app");