From aa8b69a1ae88a0533fab7d10b6068a48aaabd997 Mon Sep 17 00:00:00 2001 From: Tobias Lins Date: Mon, 16 Jan 2023 10:49:08 +0100 Subject: [PATCH] Add missing default exports --- packages/web/package.json | 2 +- packages/web/src/index.ts | 11 +++++++++-- packages/web/src/react.tsx | 14 +++++++++----- 3 files changed, 19 insertions(+), 8 deletions(-) diff --git a/packages/web/package.json b/packages/web/package.json index d5d722d..a24e2bb 100644 --- a/packages/web/package.json +++ b/packages/web/package.json @@ -1,6 +1,6 @@ { "name": "@vercel/analytics", - "version": "0.1.9-beta.0", + "version": "0.1.9-beta.1", "keywords": [ "analytics", "vercel" diff --git a/packages/web/src/index.ts b/packages/web/src/index.ts index c0ddfcc..5644876 100644 --- a/packages/web/src/index.ts +++ b/packages/web/src/index.ts @@ -1,2 +1,9 @@ -export { Analytics } from './react'; -export { inject, track } from './generic'; +import { inject, track } from './generic'; + +export { inject, track }; + +// eslint-disable-next-line import/no-default-export +export default { + inject, + track, +}; diff --git a/packages/web/src/react.tsx b/packages/web/src/react.tsx index 2e8eeb3..8b8287d 100644 --- a/packages/web/src/react.tsx +++ b/packages/web/src/react.tsx @@ -1,10 +1,8 @@ import { useEffect } from 'react'; -import { inject } from './generic'; +import { inject, track } from './generic'; import type { AnalyticsProps } from './types'; -export type { AnalyticsProps } from './types'; - -export function Analytics({ +function Analytics({ beforeSend, debug = true, mode = 'auto', @@ -15,5 +13,11 @@ export function Analytics({ return null; } +export { track, Analytics }; +export type { AnalyticsProps }; -export { track } from './generic'; +// eslint-disable-next-line import/no-default-export +export default { + Analytics, + track, +};