diff --git a/.gitignore b/.gitignore index 9ef889b7..e8fdcf88 100644 --- a/.gitignore +++ b/.gitignore @@ -6,4 +6,5 @@ node_modules/ dist/ .vscode/ coverage/ -.envrc \ No newline at end of file +.envrc +/.env diff --git a/package-lock.json b/package-lock.json index 0ce315f8..949bb093 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "next-axiom", - "version": "1.5.0", + "version": "1.5.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "next-axiom", - "version": "1.5.0", + "version": "1.5.1", "license": "MIT", "dependencies": { "use-deep-compare": "^1.2.1", diff --git a/package.json b/package.json index 6e1ca729..1135841e 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "next-axiom", "description": "Send WebVitals from your Next.js project to Axiom.", - "version": "1.5.0", + "version": "1.5.1", "author": "Axiom, Inc.", "license": "MIT", "contributors": [ diff --git a/src/platform/generic.ts b/src/platform/generic.ts index a78f3401..3dfe1e15 100644 --- a/src/platform/generic.ts +++ b/src/platform/generic.ts @@ -25,7 +25,7 @@ export default class GenericConfig implements Provider { } getLogsEndpoint(): string { - if (this.customEndpoint) { + if (isBrowser && this.customEndpoint) { return this.customEndpoint } @@ -33,7 +33,7 @@ export default class GenericConfig implements Provider { } getWebVitalsEndpoint(): string { - if (this.customEndpoint) { + if (isBrowser && this.customEndpoint) { return this.customEndpoint } diff --git a/src/platform/vercel.ts b/src/platform/vercel.ts index 1de3ee13..f08a1cf9 100644 --- a/src/platform/vercel.ts +++ b/src/platform/vercel.ts @@ -25,7 +25,7 @@ export default class VercelConfig extends GenericConfig implements Provider { } getWebVitalsEndpoint(): string { - if (this.customEndpoint) { + if (isBrowser && this.customEndpoint) { return this.customEndpoint } @@ -33,7 +33,7 @@ export default class VercelConfig extends GenericConfig implements Provider { } getLogsEndpoint(): string { - if (this.customEndpoint) { + if (isBrowser && this.customEndpoint) { return this.customEndpoint }