diff --git a/code/addons/controls/manager.js b/code/addons/controls/manager.js index 4e287d25b151..8a2eae4ffce1 100644 --- a/code/addons/controls/manager.js +++ b/code/addons/controls/manager.js @@ -1 +1 @@ -import './dist/esm/manager'; +import './dist/manager'; diff --git a/code/addons/controls/package.json b/code/addons/controls/package.json index b396f9899536..9bac9331699e 100644 --- a/code/addons/controls/package.json +++ b/code/addons/controls/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/index.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.16", @@ -68,6 +86,13 @@ "publishConfig": { "access": "public" }, + "bundler": { + "entries": [ + "./src/index.ts", + "./src/manager.tsx" + ], + "platform": "browser" + }, "gitHead": "df30e7db2b251418af106345e5722477f057ec36", "storybook": { "displayName": "Controls",