From 0e4c18f680c5d069ed7bcd957f71216cd96b031b Mon Sep 17 00:00:00 2001 From: Tony Date: Thu, 24 Oct 2024 10:15:57 +1000 Subject: [PATCH] Implement 'exports' field in package.json for the core & basics setup package --- core/package.json | 4 ++++ extensions/basic-setup/package.json | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/core/package.json b/core/package.json index 097cba4b5..ba959fa23 100644 --- a/core/package.json +++ b/core/package.json @@ -8,6 +8,10 @@ "license": "MIT", "main": "./cjs/index.js", "module": "./esm/index.js", + "exports": { + "require": "./cjs/index.js", + "import": "./esm/index.js" + }, "scripts": { "bundle": "ncc build src/index.tsx --target web --filename codemirror && npm run bundle:min", "bundle:watch": "ncc watch src/index.tsx --target web --filename codemirror", diff --git a/extensions/basic-setup/package.json b/extensions/basic-setup/package.json index c95f3e72e..98b3ae96b 100644 --- a/extensions/basic-setup/package.json +++ b/extensions/basic-setup/package.json @@ -8,6 +8,10 @@ "license": "MIT", "main": "./cjs/index.js", "module": "./esm/index.js", + "exports": { + "require": "./cjs/index.js", + "import": "./esm/index.js" + }, "scripts": { "watch": "tsbb watch src/*.ts --use-babel", "build": "tsbb build src/*.ts --use-babel"