From 613c588f83987ab0e02356e8d1f9216b7b9c3a85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C5=82a=C5=BCej=20Che=C5=82kowski?= Date: Mon, 16 Oct 2023 16:11:17 +0200 Subject: [PATCH] fix: add exports and type to package.json --- config/tsconfig.esm.json | 2 +- package.json | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/config/tsconfig.esm.json b/config/tsconfig.esm.json index 862f026..2feb945 100644 --- a/config/tsconfig.esm.json +++ b/config/tsconfig.esm.json @@ -1,7 +1,7 @@ { "extends": "../tsconfig", "compilerOptions": { - "module": "ESNext", + "module": "NodeNext", "outDir": "../dist/esm" }, "exclude": [ diff --git a/package.json b/package.json index 715fabe..865628d 100644 --- a/package.json +++ b/package.json @@ -15,9 +15,16 @@ "bin": { "roku": "dist/cjs/src/cli/index.js" }, + "type": "module", "main": "dist/cjs/src/index.js", "module": "dist/esm/src/index.js", "types": "dist/types/index.d.js", + "exports": { + ".": { + "import": "./dist/esm/src/index.js", + "require": "./dist/commonjs/src/index.cjs" + } + }, "keywords": [ "cli", "node",