Skip to content

fix: use named export for 'percyScreenshot'#589

Open
Katona wants to merge 2 commits intopercy:masterfrom
Katona:fix-types
Open

fix: use named export for 'percyScreenshot'#589
Katona wants to merge 2 commits intopercy:masterfrom
Katona:fix-types

Conversation

@Katona
Copy link

@Katona Katona commented Feb 24, 2026

Currently it's not possible to use ESM imports for percyScreenshot:

import percyScreenshot from '@percy/playwright';

Even if it compiles, percySnapshot will be used during runtime since the module exports both as default, which causes license issues etc. when tusing with Browserstack Automate.

This PR fixes it by using named export for percyScreenshot because a module can't have more than one default exported member. After this, the correct import would be:

import { percyScreenshot } from '@percy/playwright';

You can't have multiple default export in a module.
@Katona Katona requested a review from a team as a code owner February 24, 2026 08:21
@github-actions
Copy link

This PR is stale because it has been open for more than 14 days with no activity. Remove stale label or comment or this will be closed in 14 days.

@github-actions github-actions bot added the 🍞 stale Closed due to inactivity label Mar 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🍞 stale Closed due to inactivity

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant