-
-
Notifications
You must be signed in to change notification settings - Fork 139
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
57 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -183,7 +183,7 @@ | |
"typescript": "^5.3.3", | ||
"vue": "^3.4.21", | ||
"vuepress": "2.0.0-rc.9", | ||
"vuepress-plugin-umami-analytics": "^1.8.1" | ||
"vuepress-plugin-umami-analytics": "1.8.1" | ||
}, | ||
"resolutions": { | ||
"@vuepress/client": "2.0.0-rc.9", | ||
|
@@ -235,5 +235,10 @@ | |
"quantumult", | ||
"clash", | ||
"shadowrocket" | ||
] | ||
], | ||
"pnpm": { | ||
"patchedDependencies": { | ||
"[email protected]": "patches/[email protected]" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
diff --git a/dist/server/index.js b/dist/server/index.js | ||
index d61f6716a7b49354722aa01f45465c1f2e912006..a904b73033771abf9c92acd3cab130f8325344d9 100644 | ||
--- a/dist/server/index.js | ||
+++ b/dist/server/index.js | ||
@@ -1,22 +1,20 @@ | ||
import { getDirname, path } from '@vuepress/utils'; | ||
let __dirname = getDirname(import.meta.url); | ||
-export let umamiAnalyticsPlugin = ({ doNotTrack, autoTrack, hostUrl, domains, cache, src, id, }) => app => { | ||
- let plugin = { | ||
- name: 'vuepress-plugin-umami-analytics', | ||
- }; | ||
- if (app.env.isDev) { | ||
- return plugin; | ||
- } | ||
+export let umamiAnalyticsPlugin = ({ doNotTrack, autoTrack, hostUrl, domains, cache, src, id, }) => { | ||
return { | ||
- ...plugin, | ||
- define: { | ||
- __UMAMI_ANALYTICS_DO_NOT_TRACK__: doNotTrack, | ||
- __UMAMI_ANALYTICS_AUTO_TRACK__: autoTrack, | ||
- __UMAMI_ANALYTICS_HOST_URL__: hostUrl, | ||
- __UMAMI_ANALYTICS_DOMAINS__: domains, | ||
- __UMAMI_ANALYTICS_CACHE__: cache, | ||
- __UMAMI_ANALYTICS_SRC__: src, | ||
- __UMAMI_ANALYTICS_ID__: id, | ||
+ name: 'vuepress-plugin-umami-analytics', | ||
+ define: app => { | ||
+ if (!app.env.isDev) { | ||
+ return { | ||
+ __UMAMI_ANALYTICS_DO_NOT_TRACK__: doNotTrack, | ||
+ __UMAMI_ANALYTICS_AUTO_TRACK__: autoTrack, | ||
+ __UMAMI_ANALYTICS_HOST_URL__: hostUrl, | ||
+ __UMAMI_ANALYTICS_DOMAINS__: domains, | ||
+ __UMAMI_ANALYTICS_CACHE__: cache, | ||
+ __UMAMI_ANALYTICS_SRC__: src, | ||
+ __UMAMI_ANALYTICS_ID__: id, | ||
+ }; | ||
+ } | ||
}, | ||
clientConfigFile: path.resolve(__dirname, '../client/index.js'), | ||
}; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.