diff --git a/code/addons/jest/manager.js b/code/addons/jest/manager.js index 4e287d25b151..8a2eae4ffce1 100644 --- a/code/addons/jest/manager.js +++ b/code/addons/jest/manager.js @@ -1 +1 @@ -import './dist/esm/manager'; +import './dist/manager'; diff --git a/code/addons/jest/package.json b/code/addons/jest/package.json index 7d5a46d0c486..a7dfffe7ae2a 100644 --- a/code/addons/jest/package.json +++ b/code/addons/jest/package.json @@ -27,9 +27,27 @@ }, "license": "MIT", "author": "Renaud Tertrais (https://github.com/renaudtertrais)", - "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" + }, + "./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", @@ -38,7 +56,7 @@ ], "scripts": { "check": "tsc --noEmit", - "prepare": "node ../../../scripts/prepare.js" + "prepare": "../../../scripts/prepare/bundle.ts" }, "dependencies": { "@storybook/addons": "7.0.0-alpha.17", @@ -70,6 +88,13 @@ "publishConfig": { "access": "public" }, + "bundler": { + "entries": [ + "./src/index.ts", + "./src/manager.tsx" + ], + "platform": "browser" + }, "gitHead": "7d44bfd3e759c6f17b75029ee2e067fab811f27b", "storybook": { "displayName": "Jest",