From 4f241eafc61a41d2b665f54312e7e3c6e7964961 Mon Sep 17 00:00:00 2001 From: Freddy L Date: Tue, 26 Sep 2023 21:18:25 -0400 Subject: [PATCH] Added sourcemaps --- examples/next-mal-auth/src/app/providers.tsx | 7 +++---- packages/animelist-auth-next/tsconfig.json | 3 ++- scripts/esbuildProject.mts | 2 ++ tsconfig.build.json | 1 - 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/examples/next-mal-auth/src/app/providers.tsx b/examples/next-mal-auth/src/app/providers.tsx index db4f651..aee452c 100644 --- a/examples/next-mal-auth/src/app/providers.tsx +++ b/examples/next-mal-auth/src/app/providers.tsx @@ -1,9 +1,8 @@ "use client"; -import * as client from "@animelist/auth-next"; +import { SessionProvider } from "@animelist/auth-next"; -console.log({ client }) +console.log({ SessionProvider }); export default function Providers({ children }: { children: React.ReactNode }) { - return {children}; + return {children}; } - diff --git a/packages/animelist-auth-next/tsconfig.json b/packages/animelist-auth-next/tsconfig.json index 7054d11..3873140 100644 --- a/packages/animelist-auth-next/tsconfig.json +++ b/packages/animelist-auth-next/tsconfig.json @@ -6,6 +6,7 @@ "compilerOptions": { "outDir": "./dist", "declarationDir": "dist", - "baseUrl": "." + "baseUrl": ".", + "jsx": "react" }, } \ No newline at end of file diff --git a/scripts/esbuildProject.mts b/scripts/esbuildProject.mts index 14ff38e..8fc5b1e 100644 --- a/scripts/esbuildProject.mts +++ b/scripts/esbuildProject.mts @@ -32,6 +32,7 @@ export async function esbuildProject({ packageDir, exclude, inputs, ...rest }: B entryPoints, logLevel: 'debug', outdir, + sourcemap: true, format: 'cjs', outExtension: rest.outExtensions }) @@ -43,6 +44,7 @@ export async function esbuildProject({ packageDir, exclude, inputs, ...rest }: B entryPoints, logLevel: 'debug', outdir, + sourcemap: true, format: 'esm', outExtension: rest.outExtensions || { ".js": ".mjs" diff --git a/tsconfig.build.json b/tsconfig.build.json index b7151a1..9f49445 100644 --- a/tsconfig.build.json +++ b/tsconfig.build.json @@ -14,7 +14,6 @@ "moduleResolution": "node", "module": "esnext", "outDir": "./dist", - "jsx": "react", "lib": [ "esnext", "DOM",