Skip to content

Singleton loaded 2x #4270

Closed Answered by jarecsni
jarecsni asked this question in Q&A
Discussion options

You must be logged in to vote

Finally I got a break through. I went through my problem with a colleague who spotted that webpack doesn't emit any message for my library ('consume shared module / provide shared module') whereas such a message was there for react and other libraries. The library project didn't properly support ESM which caused webpack to exclude it (without an explicit error message which isn't ideal). Fixing the library to be CJS+ESM fixed the problem, only a single instance is loaded, Singletons finally work - happy days :)

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by jarecsni
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant