From 7835b0c3b24bd19dc8021490a6b032b5d184bd2d Mon Sep 17 00:00:00 2001 From: luciana-mendonca Date: Tue, 2 Aug 2022 16:45:16 +0200 Subject: [PATCH 1/3] build(addon-toolbars): use ts-up to build addon-toolbars --- code/addons/toolbars/manager.js | 2 +- code/addons/toolbars/package.json | 33 +++++++++++++++++++++++++++---- 2 files changed, 30 insertions(+), 5 deletions(-) diff --git a/code/addons/toolbars/manager.js b/code/addons/toolbars/manager.js index 4e287d25b151..8a2eae4ffce1 100644 --- a/code/addons/toolbars/manager.js +++ b/code/addons/toolbars/manager.js @@ -1 +1 @@ -import './dist/esm/manager'; +import './dist/manager'; diff --git a/code/addons/toolbars/package.json b/code/addons/toolbars/package.json index 112cae7e8d75..684de964dbcf 100644 --- a/code/addons/toolbars/package.json +++ b/code/addons/toolbars/package.json @@ -25,9 +25,27 @@ "url": "https://opencollective.com/storybook" }, "license": "MIT", - "main": "dist/cjs/manager.js", - "module": "dist/esm/manager.js", - "types": "dist/types/manager.d.ts", + "exports": { + ".": { + "require": "./dist/index.js", + "import": "./dist/index.mjs", + "types": "./dist/index.d.ts" + }, + "./manager": { + "require": "./dist/manager.js", + "import": "./dist/manager.mjs", + "types": "./dist/manager.d.ts" + }, + "./register.js": { + "require": "./dist/manager.js", + "import": "./dist/manager.mjs", + "types": "./dist/manager.d.ts" + }, + "./package.json": "./package.json" + }, + "main": "dist/index.js", + "module": "dist/index.mjs", + "types": "dist/index.d.ts", "files": [ "dist/**/*", "README.md", @@ -36,7 +54,7 @@ ], "scripts": { "check": "tsc --noEmit", - "prepare": "node ../../../scripts/prepare.js" + "prepare": "../../../scripts/prepare/bundle.ts" }, "dependencies": { "@storybook/addons": "7.0.0-alpha.17", @@ -64,6 +82,13 @@ "publishConfig": { "access": "public" }, + "bundler": { + "entries": [ + "./src/index.ts", + "./src/manager.tsx" + ], + "platform": "browser" + }, "gitHead": "7d44bfd3e759c6f17b75029ee2e067fab811f27b", "storybook": { "displayName": "Toolbars", From 27517fff925e8db06ffa61be86a63ed5bb97bdca Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Wed, 10 Aug 2022 16:31:04 +0200 Subject: [PATCH 2/3] fix linting --- code/addons/toolbars/package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/code/addons/toolbars/package.json b/code/addons/toolbars/package.json index b15fd205c0a2..18dd68ab6e65 100644 --- a/code/addons/toolbars/package.json +++ b/code/addons/toolbars/package.json @@ -82,7 +82,6 @@ "publishConfig": { "access": "public" }, - "bundler": { "entries": [ "./src/index.ts", From 003a05468d5c04b8b728c454c980295936eecb63 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Wed, 10 Aug 2022 16:50:05 +0200 Subject: [PATCH 3/3] fix --- code/addons/toolbars/src/index.ts | 1 + 1 file changed, 1 insertion(+) create mode 100644 code/addons/toolbars/src/index.ts diff --git a/code/addons/toolbars/src/index.ts b/code/addons/toolbars/src/index.ts new file mode 100644 index 000000000000..cb0ff5c3b541 --- /dev/null +++ b/code/addons/toolbars/src/index.ts @@ -0,0 +1 @@ +export {};