Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: adds a workaround for a safari bug when loading modules async #617

Merged
merged 3 commits into from
Sep 15, 2024

Conversation

Tiagoperes
Copy link
Contributor

Description

Safari currently has a bug where, if the same module is imported twice or more simultaneously, it fails with a reference error.

This is actually a Webkit bug and is registered here: WebKit/WebKit#24122

We don't know when this bug will be fixed, but we can work around it with a simple modification that prevents the same remote module from being imported twice. This PR implements this modification.

I'm not familiar with the source code of this lib, so I altered the function __federation_import everywhere I found it. Please, check.

What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

Before submitting the PR, please make sure you do the following

  • Read the Code of Conduct and follow the Commit Convention guidelines.
  • Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
  • Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123).
  • Ideally, include relevant tests that fail without this PR but pass with it.

@ruleeeer
Copy link
Collaborator

It seems that this change is harmless, I will review the test issue when I have time

@ruleeeer ruleeeer changed the title Adds a workaround for a safari bug when loading modules async feat: adds a workaround for a safari bug when loading modules async Sep 15, 2024
@ruleeeer ruleeeer merged commit bbd1d89 into originjs:main Sep 15, 2024
8 checks passed
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.

2 participants