From b8a6860ed5555c22306dcbe7f1d61c0cf0a801fc Mon Sep 17 00:00:00 2001 From: David Hunt Date: Thu, 10 Oct 2024 06:52:07 +1300 Subject: [PATCH] fix(playwright): files exports for world and PlaywrightWorld --- .changeset/tasty-weeks-jog.md | 5 +++++ packages/playwright/package.json | 18 ++++++++++++++---- packages/playwright/rollup.config.js | 2 +- 3 files changed, 20 insertions(+), 5 deletions(-) create mode 100644 .changeset/tasty-weeks-jog.md diff --git a/.changeset/tasty-weeks-jog.md b/.changeset/tasty-weeks-jog.md new file mode 100644 index 0000000..a9d4669 --- /dev/null +++ b/.changeset/tasty-weeks-jog.md @@ -0,0 +1,5 @@ +--- +"@quickpickle/playwright": patch +--- + +fix package.json for files exports diff --git a/packages/playwright/package.json b/packages/playwright/package.json index 94280fe..c6f7b80 100644 --- a/packages/playwright/package.json +++ b/packages/playwright/package.json @@ -26,22 +26,32 @@ "license": "MIT", "type": "module", "main": "./dist/PlaywrightWorld.cjs", - "module": "./dist/PlaywrightWorld.esm.js", + "module": "./dist/PlaywrightWorld.mjs", "types": "./dist/PlaywrightWorld.d.ts", "exports": { ".": { + "require": "./dist/PlaywrightWorld.cjs", + "import": "./dist/PlaywrightWorld.mjs", + "types": "./dist/PlaywrightWorld.d.ts" + }, + "./PlaywrightWorld": { + "require": "./dist/PlaywrightWorld.cjs", + "import": "./dist/PlaywrightWorld.mjs", + "types": "./dist/PlaywrightWorld.d.ts" + }, + "./world": { "require": "./dist/world.cjs", - "import": "./dist/world.esm.js", + "import": "./dist/world.mjs", "types": "./dist/world.d.ts" }, "./actions": { "require": "./dist/actions.steps.cjs", - "import": "./dist/actions.steps.esm.js", + "import": "./dist/actions.steps.mjs", "types": "./dist/actions.steps.d.ts" }, "./outcomes": { "require": "./dist/outcomes.steps.cjs", - "import": "./dist/outcomes.steps.esm.js", + "import": "./dist/outcomes.steps.mjs", "types": "./dist/outcomes.steps.d.ts" } }, diff --git a/packages/playwright/rollup.config.js b/packages/playwright/rollup.config.js index fb36973..59bad9c 100644 --- a/packages/playwright/rollup.config.js +++ b/packages/playwright/rollup.config.js @@ -26,7 +26,7 @@ export default { format: 'esm', sourcemap: true, exports: 'named', - entryFileNames: '[name].esm.js' + entryFileNames: '[name].mjs' } ], plugins: [