From f57dbd975494ec78da253308e9f6076eeff12aef Mon Sep 17 00:00:00 2001 From: GanHingLong0423 <108907456+GanHingLong0423@users.noreply.github.com> Date: Wed, 10 Aug 2022 22:07:45 +0800 Subject: [PATCH 1/2] Generate lib/core-webpack with ts-up --- code/lib/core-webpack/package.json | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/code/lib/core-webpack/package.json b/code/lib/core-webpack/package.json index e766ee942cc3..b9d1f4092278 100644 --- a/code/lib/core-webpack/package.json +++ b/code/lib/core-webpack/package.json @@ -19,9 +19,17 @@ "url": "https://opencollective.com/storybook" }, "license": "MIT", - "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/**/*", "types/**/*", @@ -31,7 +39,7 @@ ], "scripts": { "check": "tsc --noEmit", - "prepare": "node ../../../scripts/prepare.js" + "prepare": "../../../scripts/prepare/bundle.ts" }, "dependencies": { "@storybook/core-common": "7.0.0-alpha.18", @@ -46,5 +54,10 @@ "publishConfig": { "access": "public" }, + "bundler": { + "entries": [ + "./src/index.ts" + ] + }, "gitHead": "bd59f1eef0f644175abdb0d9873ed0553f431f53" } From e7defc682a2685fde9c94ea210c26851b2d1d64e Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 23 Aug 2022 12:10:25 +0200 Subject: [PATCH 2/2] fixes --- code/lib/core-webpack/package.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/code/lib/core-webpack/package.json b/code/lib/core-webpack/package.json index 4d4308cff3e1..4080d91a2a21 100644 --- a/code/lib/core-webpack/package.json +++ b/code/lib/core-webpack/package.json @@ -19,7 +19,7 @@ "url": "https://opencollective.com/storybook" }, "license": "MIT", - "exports": { + "exports": { ".": { "require": "./dist/index.js", "import": "./dist/index.mjs", @@ -57,7 +57,8 @@ "bundler": { "entries": [ "./src/index.ts" - ] + ], + "platform": "node" }, "gitHead": "0900e20acfbc12551c6a3f788b8de5dd6af5f80a" }