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

Export not found when lazy load all bundles by react-universal-component #219

Open
NNSTH opened this issue Oct 22, 2020 · 6 comments
Open

Comments

@NNSTH
Copy link

NNSTH commented Oct 22, 2020

Hello,

I'm using this repo for a long period, and am very satisfied with it's results.
thanks for the awesome work!
Now, while working on performance improvements of our SSR pages, I want to load all bundles only for the active users.
This means that we don't use the "js" property of the "flushChunks" res, but taking the "scripts" from it and after we detect any user interaction with the page- we add it via a script element added to the head of the html.
Let me know if I'm not clear enough so I'll add some code samples.

Our bundles are not changed within this change, but the problem that I see is sometimes when a user interaction was detected, the bundles failed to load with error: "Export not found".

Can you explain what is my issue? How can I fix it?

@ScriptedAlchemy
Copy link
Collaborator

Try using something like yett, that lets you block scripts from being created on the dom

@NNSTH
Copy link
Author

NNSTH commented Oct 22, 2020

thanks for the quick reply, I'll give it a try.

@ScriptedAlchemy
Copy link
Collaborator

It wasn't designed to do this. But I've modified yett to wrangle third party code. You can make some slight edits and likely get something you want

@NNSTH
Copy link
Author

NNSTH commented Oct 22, 2020

My own code that handled this was not so different then yett's one, Why do you think it should prevent the problem?

@NNSTH
Copy link
Author

NNSTH commented Nov 5, 2020

this issue is still not fixed by the package you suggested, I guess it may be related to timing, can you point me to the relevant code so I can check what causing it now?

@ScriptedAlchemy
Copy link
Collaborator

Look at module federation instead newer technology

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

No branches or pull requests

2 participants