Skip to content

Commit

Permalink
Add missing default exports
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiaslins committed Jan 16, 2023
1 parent e657175 commit aa8b69a
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 8 deletions.
2 changes: 1 addition & 1 deletion packages/web/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vercel/analytics",
"version": "0.1.9-beta.0",
"version": "0.1.9-beta.1",
"keywords": [
"analytics",
"vercel"
Expand Down
11 changes: 9 additions & 2 deletions packages/web/src/index.ts
Original file line number Diff line number Diff line change
@@ -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,
};
14 changes: 9 additions & 5 deletions packages/web/src/react.tsx
Original file line number Diff line number Diff line change
@@ -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',
Expand All @@ -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,
};

0 comments on commit aa8b69a

Please sign in to comment.