From cef7ff10cfe95bbe7830d67893a6a6e4f49d6235 Mon Sep 17 00:00:00 2001 From: ali589 Date: Wed, 15 Jan 2025 11:18:05 -0500 Subject: [PATCH] fix(interop): fix export and use commonJS --- src/index.ts | 2 +- tsconfig.json | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 38ca599..bb561b4 100644 --- a/src/index.ts +++ b/src/index.ts @@ -34,4 +34,4 @@ function createSharedReactContext( return context; } -export default createSharedReactContext; +export = createSharedReactContext; diff --git a/tsconfig.json b/tsconfig.json index 8a17baf..74f7634 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -2,10 +2,12 @@ "compilerOptions": { "jsx": "react", "allowSyntheticDefaultImports": true, + "esModuleInterop": true, "types": ["node"], "outDir": "./dist", "allowJs": true, "target": "es6", + "module": "commonjs", "moduleResolution": "node", "strict": true },