vercel analytics script on both pages; disable project SSO protection (was 404-ing visitors)
This commit is contained in:
1 parent
cc6a660729
commit
632d053de9
68 files changed
+5662
No files matched your search
+30
@@ -0,0 +1,30 @@
|
||||
// src/nuxt/module.ts
|
||||
import { addPlugin, addTemplate, defineNuxtModule } from "@nuxt/kit";
|
||||
var module_default = defineNuxtModule({
|
||||
meta: {
|
||||
name: "@vercel/analytics",
|
||||
configKey: "analytics",
|
||||
docs: "https://vercel.com/docs/analytics/quickstart"
|
||||
},
|
||||
setup() {
|
||||
const template = addTemplate({
|
||||
filename: "vercel-analytics.client.ts",
|
||||
getContents: () => `
|
||||
import { injectAnalytics } from '@vercel/analytics/nuxt/runtime'
|
||||
import { defineNuxtPlugin } from '#imports'
|
||||
|
||||
export default defineNuxtPlugin(() => {
|
||||
injectAnalytics()
|
||||
})
|
||||
`
|
||||
});
|
||||
addPlugin({
|
||||
src: template.dst,
|
||||
mode: "client"
|
||||
});
|
||||
}
|
||||
});
|
||||
export {
|
||||
module_default as default
|
||||
};
|
||||
//# sourceMappingURL=index.mjs.map
|
||||
Reference in new issue
Block a user