From ff2729f69065cf2ee7f5d2e8bbf133d5b0424d1b Mon Sep 17 00:00:00 2001 From: Steve Ayers Date: Tue, 5 Dec 2023 21:34:01 -0500 Subject: [PATCH] Node exports --- packages/protobuf/package.json | 8 ++++++-- packages/protoplugin/package.json | 16 ++++++++++++---- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/packages/protobuf/package.json b/packages/protobuf/package.json index 81b39d93a..9cdc328ab 100644 --- a/packages/protobuf/package.json +++ b/packages/protobuf/package.json @@ -25,9 +25,13 @@ "main": "./dist/cjs/index.js", "exports": { ".": { + "node": { + "import": "./dist/proxy/index.js", + "require": "./dist/cjs/index.js" + }, "module": "./dist/esm/index.js", - "require": "./dist/cjs/index.js", - "import": "./dist/proxy/index.js" + "import": "./dist/esm/index.js", + "require": "./dist/cjs/index.js" } }, "devDependencies": { diff --git a/packages/protoplugin/package.json b/packages/protoplugin/package.json index 64d13e130..8c6dfb153 100644 --- a/packages/protoplugin/package.json +++ b/packages/protoplugin/package.json @@ -21,14 +21,22 @@ "main": "./dist/cjs/index.js", "exports": { ".": { + "node": { + "import": "./dist/proxy/index.js", + "require": "./dist/cjs/index.js" + }, "module": "./dist/esm/index.js", - "require": "./dist/cjs/index.js", - "import": "./dist/proxy/index.js" + "import": "./dist/esm/index.js", + "require": "./dist/cjs/index.js" }, "./ecmascript": { + "node": { + "import": "./dist/proxy/ecmascript/index.js", + "require": "./dist/cjs/ecmascript/index.js" + }, "module": "./dist/esm/ecmascript/index.js", - "require": "./dist/cjs/ecmascript/index.js", - "import": "./dist/proxy/ecmascript/index.js" + "import": "./dist/esm/ecmascript/index.js", + "require": "./dist/cjs/ecmascript/index.js" } }, "typesVersions": {