From 0ecaea36b1f76f2f933a234b0379524f1f1bdab4 Mon Sep 17 00:00:00 2001 From: Javier Arango Date: Fri, 30 Sep 2022 12:24:07 -0400 Subject: [PATCH] Build lib/store with tsup --- code/lib/store/package.json | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/code/lib/store/package.json b/code/lib/store/package.json index cb50fa2c603f..adb7f616942c 100644 --- a/code/lib/store/package.json +++ b/code/lib/store/package.json @@ -20,9 +20,17 @@ }, "license": "MIT", "sideEffects": false, - "main": "dist/cjs/index.js", - "module": "dist/esm/index.js", - "types": "dist/types/index.d.ts", + "exports": { + ".": { + "require": "./dist/index.js", + "import": "./dist/index.mjs", + "types": "./dist/index.d.ts" + }, + "./package.json": "./package.json" + }, + "main": "dist/index.js", + "module": "dist/index.mjs", + "types": "dist/index.d.ts", "files": [ "dist/**/*", "README.md", @@ -31,7 +39,7 @@ ], "scripts": { "check": "../../../scripts/node_modules/.bin/tsc --noEmit", - "prep": "node ../../../scripts/prepare.js" + "prep": "../../../scripts/prepare/bundle.ts" }, "dependencies": { "@storybook/addons": "7.0.0-alpha.34", @@ -57,5 +65,11 @@ "publishConfig": { "access": "public" }, + "bundler": { + "entries": [ + "./src/index.ts" + ], + "platform": "browser" + }, "gitHead": "fc90fc875462421c1faa35862ac4bc436de8e75f" }