Skip to content

Conversation

@mmartinsoliv
Copy link
Contributor

@mmartinsoliv mmartinsoliv commented Dec 12, 2025

What's the problem this PR addresses?

When FastStore is loaded inside an iframe (such as VTEX
Preview), Partytown throws a SecurityError: Failed to read a
named property 'dispatchEvent' from 'Window' due to
cross-origin restrictions. This prevents the preview from
working correctly.

Changes Made:

  • Modified ThirdPartyScripts.tsx to dynamically import
    Partytown only on client-side

@mmartinsoliv mmartinsoliv requested a review from a team as a code owner December 12, 2025 19:33
@mmartinsoliv mmartinsoliv requested review from gabpaladino and lucasfp13 and removed request for a team December 12, 2025 19:33
@codesandbox-ci
Copy link

codesandbox-ci bot commented Dec 12, 2025

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@mmartinsoliv mmartinsoliv force-pushed the chore/remove-partytown branch 2 times, most recently from e19b443 to fe671bb Compare December 15, 2025 19:45
@mmartinsoliv mmartinsoliv changed the title Chore/remove partytown fix: Prevent Partytown cross-origin errors in iframe environments Dec 16, 2025
@mmartinsoliv mmartinsoliv force-pushed the chore/remove-partytown branch from a4aba32 to 8b7d80a Compare December 16, 2025 15:33
@lemagnetic
Copy link
Contributor

Hey @mmartinsoliv! Quick check: I can only see changes in ThirdPartyScripts.tsx in the diff. Are the other updates mentioned in “Changes Made” already covered elsewhere or were they reverted?

@mmartinsoliv
Copy link
Contributor Author

Hey @mmartinsoliv! Quick check: I can only see changes in ThirdPartyScripts.tsx in the diff. Are the other updates mentioned in “Changes Made” already covered elsewhere or were they reverted?

Hi @lemagnetic! I updated the readme file. The only adjustment is adding a conditional statement.

@hellofanny hellofanny merged commit 997252e into dev Jan 8, 2026
5 of 6 checks passed
@hellofanny hellofanny deleted the chore/remove-partytown branch January 8, 2026 21:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants