Skip to content

Using UMD to create Singleton Instance across Micro Frontends #142

@NikJ87

Description

@NikJ87

Hi,

I have a use case where I want to shared Singleton instance across Microfrontend with following condition:

  1. First Micro frontend created in Vanilla JS
  2. Other Micro frontend created in React JS
  3. which ever load first initializes the instance of my JS script and other while loading just uses it.

I was looking forward to use UMD but couldn't work it out without attaching initialised instance to window object. But I don't want to expose it at global variable level.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions