Skip to content

[Bug]: Runtime imports with loadRemote are broken in safari #319

@lucax88x

Description

@lucax88x

Describe the bug

loadRemote does not work with Safari, in the repo example you can see that I have 3 LazyComponent (rendering the same remote/component) and two of them will always go in error due to:

Image Image

I suspect this is related to this safari bug

(it's not related to versions, I tried forking your example with vite 5, and had the same issue)

I'm well aware it could be a federation/runtime bug, and I'm also open to fix this bug, but I need some guidance there to understand where the issue could be. I was able to find out that the await import('component') in the virtual-exposes.mf it will give a "uninitialized" module in safari, but, why?

Version

7

Reproduction

https://github.com/lucax88x/module-federation-vite-react-bug

Relevant log output

ReferenceError: Cannot access uninitialized variable.

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    COMMUNITY: PR is welcomedWe think it's a good feature to have but would love for the community to help with the PR for itbugSomething isn't workinghelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions