diff --git a/packages/web/src/nextjs/index.tsx b/packages/web/src/nextjs/index.tsx index f5f6fc0..05fafeb 100644 --- a/packages/web/src/nextjs/index.tsx +++ b/packages/web/src/nextjs/index.tsx @@ -1,3 +1,4 @@ +'use client'; import React, { Suspense, type ReactNode } from 'react'; import { Analytics as AnalyticsScript } from '../react'; import type { AnalyticsProps, BeforeSend, BeforeSendEvent } from '../types'; diff --git a/packages/web/tsup.config.js b/packages/web/tsup.config.js index e117ab4..7df1f1a 100644 --- a/packages/web/tsup.config.js +++ b/packages/web/tsup.config.js @@ -24,12 +24,6 @@ export default defineConfig([ }, external: ['react', 'next'], outDir: 'dist/next', - esbuildOptions: (options) => { - // Append "use client" to the top of the react entry point - options.banner = { - js: '"use client";', - }; - }, }, { ...cfg,