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: [