From cb177dff9772e4c3f3eb0aa3a562653b4200ae57 Mon Sep 17 00:00:00 2001 From: Manuel Roth Date: Thu, 8 Aug 2024 20:46:24 +0200 Subject: [PATCH 1/2] Correct ES Module exports in package.json --- package.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index f1ba9af25b..15d86dd76b 100644 --- a/package.json +++ b/package.json @@ -5,23 +5,23 @@ "main": "lib/cjs/index.js", "exports": { ".": { - "import": "./lib/cjs/index.js", + "import": "./lib/mjs/index.js", "require": "./lib/cjs/index.js" }, "./sdk": { - "import": "./lib/cjs/Formio.js", + "import": "./lib/mjs/Formio.js", "require": "./lib/cjs/Formio.js" }, "./utils": { - "import": "./lib/cjs/utils/index.js", + "import": "./lib/mjs/utils/index.js", "require": "./lib/cjs/utils/index.js" }, "./form": { - "import": "./lib/cjs/formio.form.js", + "import": "./lib/mjs/formio.form.js", "require": "./lib/cjs/formio.form.js" }, "./embed": { - "import": "./lib/cjs/InlineEmbed.js", + "import": "./lib/mjs/InlineEmbed.js", "require": "./lib/cjs/InlineEmbed.js" }, "./dist/*": "./dist/*" From 41130970e84c60e571467e3542ae20f0451296c6 Mon Sep 17 00:00:00 2001 From: Manuel Roth Date: Tue, 13 Aug 2024 22:07:47 +0200 Subject: [PATCH 2/2] Define module type --- package.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/package.json b/package.json index 15d86dd76b..e62f1cf98f 100644 --- a/package.json +++ b/package.json @@ -2,6 +2,8 @@ "name": "@formio/js", "version": "5.0.0-rc.71", "description": "JavaScript powered Forms with JSON Form Builder", + "type": "module", + "module": "lib/mjs/index.js", "main": "lib/cjs/index.js", "exports": { ".": {