From a9f81a6759755637f0b162fde2e40612006106e5 Mon Sep 17 00:00:00 2001 From: Gajus Kuizinas Date: Wed, 19 Oct 2022 15:18:20 -0500 Subject: [PATCH] fix: produce proper esm bundle --- package.json | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 1607339..1c926ed 100644 --- a/package.json +++ b/package.json @@ -9,14 +9,13 @@ "registry": "https://npm.pkg.github.com" }, "main": "dist/cjs/index.js", - "module": "./dist/esm/index.js", + "module": "./dist/esm/index.mjs", "types": "./dist/esm/index.d.ts", "exports": { "require": "./dist/cjs/index.js", - "import": "./dist/esm/index.js", + "import": "./dist/esm/index.mjs", "default": "./dist/esm/index.js" }, - "type":"module", "files": [ "dist" ], @@ -29,7 +28,7 @@ "scripts": { "build": "yarn build:esm && yarn build:cjs", "build:cjs": "node ./bin/build-cjs.js", - "build:esm": "yarn tsc --project tsconfig.build.json && tsc-esm-fix --tsconfig ./tsconfig.build.json", + "build:esm": "yarn tsc --project tsconfig.build.json && tsc-esm-fix --tsconfig ./tsconfig.build.json --ext=.mjs", "build:storybook": "build-storybook", "check:package": "yarn package-check", "check:tsc": "yarn tsc --noEmit",