diff --git a/lib/components/MixpanelContext.tsx b/lib/components/MixpanelContext.tsx index e5bad4a..f6becea 100644 --- a/lib/components/MixpanelContext.tsx +++ b/lib/components/MixpanelContext.tsx @@ -7,7 +7,7 @@ interface MixpanelContextProps { interface MixpanelProviderProps { children: React.ReactNode; - eventApiClient: (args: DTO) => Promise; + eventApiClient: (args: DTO) => Promise; } const MixpanelContext = createContext | null>(null); diff --git a/package.json b/package.json index bcd6ebd..280c872 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ ], "description": "Configure and use Google Analytics and Google Tag Manager in your Next.js app.", "type": "module", - "types": "dist/main.d.ts", + "types": "dist/types/main.d.ts", "main": "dist/analytics-essentials.cjs", "module": "dist/analytics-essentials.js", "files": [ diff --git a/vite.config.ts b/vite.config.ts index a1ce893..9741aee 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -14,14 +14,7 @@ export default defineConfig({ }, rollupOptions: { external: ['react', 'react/jsx-runtime', 'react-dom', 'next'], - output: { - globals: { - react: 'React', - 'react/jsx-runtime': 'react/jsx-runtime', - 'react-dom': 'ReactDOM', - }, - }, }, }, - plugins: [react(), dts({ include: ['lib'], rollupTypes: true })], + plugins: [react(), dts({ include: ['lib'], outDir: ['dist/types'] })], });