From 77e430e08c7642f9be1a04bf2af53510fdbf06fb Mon Sep 17 00:00:00 2001 From: Peter Krol Date: Fri, 5 Jul 2024 00:42:54 +0000 Subject: [PATCH] fix(transformers): export both cjs and esm --- packages/transformers/package.json | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/transformers/package.json b/packages/transformers/package.json index fa36cf9b..e4b6b04a 100644 --- a/packages/transformers/package.json +++ b/packages/transformers/package.json @@ -14,10 +14,13 @@ "directory": "dist" }, "exports": { - "./*": "./build/esm/*.js" + "./*": { + "require": "./build/cjs/*.cjs", + "import": "./build/esm/*.js" + } }, "scripts": { - "build": "yarn org:tsc -b ./tsconfig.json", + "build": "yarn org:tsc -b ./tsconfig.json && yarn build-mjs && yarn build-cjs", "build-mjs": "yarn org:babel build/esm --config-file ./.babel.mjs.json --out-dir build/mjs --out-file-extension .mjs --source-maps", "build-cjs": "yarn org:babel build/esm --config-file ./.babel.cjs.json --out-dir build/cjs --out-file-extension .cjs --source-maps", "build-pack": "yarn build && yarn org:concurrently \"yarn build-cjs\" \"yarn build-mjs\" && fncts-pack",