From 03bb4d97630c0eabf60528c90ca801a06ca08e2b Mon Sep 17 00:00:00 2001 From: Andrew Leedham Date: Thu, 27 Jan 2022 15:34:28 +0000 Subject: [PATCH 1/2] fix: add exports main field --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index d39b1887..a63cac13 100644 --- a/package.json +++ b/package.json @@ -5,6 +5,7 @@ "author": "Mark ", "main": "index.js", "module": "index.mjs", + "exports": "./index.mjs", "scripts": { "benchmark": "node benchmark", "build": "rollup --config --failAfterWarnings", From 9e15c45178070309eef33ee7dce5a0de37275996 Mon Sep 17 00:00:00 2001 From: Andrew Leedham Date: Fri, 28 Jan 2022 14:19:52 +0000 Subject: [PATCH 2/2] refactor: use import and require fields --- package.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index a63cac13..45b69b3a 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,10 @@ "author": "Mark ", "main": "index.js", "module": "index.mjs", - "exports": "./index.mjs", + "exports": { + "import": "./index.mjs", + "require": "./index.js" + }, "scripts": { "benchmark": "node benchmark", "build": "rollup --config --failAfterWarnings",